• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to highlight node of JTree programaticlly??  RSS feed

 
sharath kv
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I want to highlight the node of a Jtree
programaticlly.
I tried using this but it didn't work
mytree.setSelectionPath(treePath);
The treePath is displayed correctly in the
DOS prompt but the JTree is not highlighting
that last node of the treePath.
I tried this with no luck again
TreeNode[] treeN = mytree.getSelectionPath();
mytree.setSelectionPath(new TreePath(treeN));
I tried this also with no luck
mytree.scrollPathToVisible(treePath);
Any help would be appreciated
Thank you
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!