Bookmark Topic Watch Topic
  • New Topic

find function in JTree..urgent!!  RSS feed

 
vinuv10
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello All,
I have a JTree component in an applet which has a JTextField below it. Now I want to type a node name in the textfield & when I press "Enter" key it should select. I'm able 2 do this but I also want it in such a way that if there are multiple nodes with the same name ,then on first "Enter" it should select the first one it got, again when I press "Enter" it should select the next node with the same name & so on..any ideas pls??
Also, the Jtree is contained in a scrollpane, if the tree is huge & a node is selected which is below the view of the scrollpane, then I have to manually move the scrollbar down to view the selected node, Is it possible to automatically scroll the scrollbar down when such a node is selected?
Thanx
Vinod
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Report post to moderator
Vinod,
"vinuv10" is not in keeping with the JavaRanch Naming Policy. Please choose a name that meets the requirements and re-register.
Bodie
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Report post to moderator
This thread is a duplicate of one posted again this morning, so I am closing it here. You can view the duplicate here.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!