• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTree Node Selection  RSS feed

 
Manikandan Adaikkalavan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am having a JTree.
In this jtree, i am having various levels of node.
Take for example,my jtree contains structure like this....

Computer(Top Root Node)
>> Languages (first child node)
>> Java (node under Languages)
>> C ++ (node under Languages)
>> C (node under Languages)
>> OS (Second Child Node)
>> Windows (node under OS)
>> Unix (node under OS)
If i delete the node "C++", then i need to select node "Java" after deletion.
Here i am able to get the detail of the next sibling using getNextSibling().
But how to select the next sibling ???
Itz very urgent...Please help me out....
Any help would be greatly appreciated..

Thanks,
Manikandan
 
Manikandan Adaikkalavan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the solution ...using getMaxSelectionRow()
and setSelectionRow() methods i can be able to do it.
Thanks
Manikandan
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!