• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTree Node Selection

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the solution ...using getMaxSelectionRow()
and setSelectionRow() methods i can be able to do it.
Thanks
Manikandan
reply
    Bookmark Topic Watch Topic
  • New Topic