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

DefaultTreeModel related issue

 
Anand Loni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My Problem is - I dont want to make particular node of tree as a root. I just want all nodes to remain parallel. As DefaultTreeModel require node to be passed in constructor,I have to make one of node as a root.

Thnx in advance.
Anand
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the JTree properties for rootVisible and showsRootHandles:
 
Anand Loni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeff,

It worked fine...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!