• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTree  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I 've got JTree and I want get the rootnode of the tree for further development and iam facing some problem in getting that do teel me to how to get that
Thanks in adv,
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, which you agreed to when you registered, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Get the tree model from JTree, and TreeModel class has getRoot()
method which returns you the root of the JTree.
Hope this helps.
Regards
Durga

Originally posted by Priya M:
I 've got JTree and I want get the rootnode of the tree for further development and iam facing some problem in getting that do teel me to how to get that
Thanks in adv,


 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!