aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to make the whole tree expanded? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to make the whole tree expanded?" Watch "How to make the whole tree expanded?" New topic
Author

How to make the whole tree expanded?

Linda Xu
Ranch Hand

Joined: Feb 14, 2000
Posts: 51
Hi,
I have a JTree on my GUI, for some reason, each time when a new node added / deleted to/from the tree, I want the whole tree been expanded, that means all nodes in the tree are visible.
I found a method
public void scrollPathToVisible(TreePath path)
in class JTree, but this method only expand one path, all the others are collasped.
Is there any method can expand the whole tree?
Thanks!
John Smith
Ranch Hand

Joined: Jul 20, 2001
Posts: 84
Give this a try:
 
Consider Paul's rocket mass heater.
 
subject: How to make the whole tree expanded?
 
Similar Threads
Refreshing JTree
Jtree Ugly Look
Searching a JTree
collapsing JTree
Expanding a Specific Node in JTree