This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filter JTree  RSS feed

 
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!