Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTree Porblem ! Pl help!

 
Pradeep Chopra
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear all,
we have a jtree used to display file hierarchy in our application. The root of the tree is "XYZ" node. The user can add and delete nodes.
Now the problem is when all the nodes are deleted (except XYZ) , XYZ becomes the leaf node and looks like file instead of directory.
Is there any way to let XYZ node directory (i.e. icon of this node should be of directory type)?
Or is there a way, i can add a node to XYZ and keep it hide?
Its really hampering my progress?
Thanks a ton in advance
Regards
Pradeep
 
Swamy Vatti
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to implement isLeaf method. If the node you show is a file return true else return true.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!