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!

Selection in JTreeTables

843804Feb 25 2002 — edited Jul 31 2007
I'm trying to programmatically select nodes within my JTreeTable, with zero-success...

I imagined the following would be fine for rendering the selection.

JTree tree = treeTable.getTree();
tree.setExpandsSelectedPaths(true);
// ...
treePath = treePath.pathByAddingChild(someObject);
tree.setSelectionPath(treePath);

The parent node is properly expanded and the new child becomes visible, however, there is no selection.

Any help very welcome.

thanks,
ian
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 28 2007
Added on Feb 25 2002
20 comments
258 views