• Post Reply Bookmark Topic Watch Topic
  • New Topic

multiple node selection

 
pavan in
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jtree which is set to TreeSelectionModel.SINGLE_TREE_SELECTION. But, I also have a search facility which might result in two nodes having same id to be shown to user. How can I achieve this?
Below is code snippet of what I have done , which is not working.
//When multiple values are found....change the selection mode..
jtree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
jtree.setSelectionPaths(treepath);
jtree.scrollPathToVisible(treepath[0]);
jtree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
 
pavan in
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any thoughts on this?
I am still not able to figure this out.
Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!