Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get location of tree node or list item as a Point?

843804Nov 24 2004 — edited Nov 24 2004
Trying to get my jfcUnit automation to work, and I can't seem to find a way to get the Point x,y location of a node I find in a tree, or an item in a list selection. I am attempting to automate drag/drop and I need to provide the x,y location where to start the drag. Can anyone tell me how I take a TreeNode, TreePath and/or DefaultMutableTreeNode and get it's x,y location? It can be relative to the jtree x,y top left corner and/or the absolute position on the screen. Same goes for JList item... how to get both x,y relative to tope left list component location and absolute screen position.

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 22 2004
Added on Nov 24 2004
9 comments
375 views