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

Filter JTree

 
pavan in
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have JTree with 10 levels.
How can I show the root and the first level nodes only (NO grand-children) in a JTree?
Thanks.
[ October 22, 2002: Message edited by: pavan in ]
 
Bill Liteplo
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume you have some sort of TreeNodes.
I haven't tried the following but you can try something like this. You may have a better way to determine what is the root node.
 
Everybody's invited. Except this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!