This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes how to expand only selected node in one level  in JTree? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "how to expand only selected node in one level  in JTree?" Watch "how to expand only selected node in one level  in JTree?" New topic
Author

how to expand only selected node in one level in JTree?

sridhar bvap
Greenhorn

Joined: Mar 12, 2008
Posts: 19
Hi to all,
iam using JTree.What i want is, when i select a perticular node in one level, the tree has to display only child nodes of selected node, the other nodes in that level automatically collapse if they already expanded. That is in a one level only one node has to expand, the other nodes has to collapse.
If any budy knows this please help me.

Thanks to one and all.
[ March 31, 2008: Message edited by: sridhar bvap ]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how to expand only selected node in one level in JTree?
 
Similar Threads
Highlight multiple nodes in jtree
Expand/Collapse functionality on JSP page
How to schedule a task higher priority in a worker thread?
TreeSelectionEvent, TreeExpansionEvent not fired in swing GUI on JRE 1.6
Child windows not getting closed