File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JTree expansion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTree expansion" Watch "JTree expansion" New topic
Author

JTree expansion

NIKHIL EROS
Greenhorn

Joined: Sep 21, 2001
Posts: 17
My tree is coming collapsed when i run my application, i have tried using functions like expandRow(int), setExpandedState(Treepath, boolean), but it doesn't work.
Also if i use setExpandedState(Treepath, boolean) function, then in collapsed state Treepath argument will be null, so there is no point in using it.
please help me!!
thanks in advance.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
HI Nikhil,
Not sure what you have tried. The example below works great. To run it just type:
java ExpandDemo
To run it and have all folders expanded type:
java ExpandDemo true

Regards,
Manfred.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTree expansion