Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes JTree in Browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTree in Browser " Watch "JTree in Browser " New topic
Author

JTree in Browser

prabha palani
Greenhorn

Joined: Jan 26, 2004
Posts: 2
I have a clarification regarding usage of JTree in JApplet.
The problem is described below.
Can anyone provide a sol.
Thanks in advance.
Problem Description :

JTree is contained in JApplet.
This JApplet is loaded in a Browser.
The user can expand the JTree nodes.
When the user clicks on Refresh button of the browser, the nodes get shrunk and only the Root node becomes visible.
The user cannot get back the expanded tree structure.

How to maintain the expanded state of the tree nodes even after refresh.
Casen Densmore
Greenhorn

Joined: Jan 22, 2004
Posts: 14
Have you tried making the tree expand on loading of the jtree?

perhaps something like this?
jTree.expandPath(new TreePath(root.getPath()));

-Casen
prabha palani
Greenhorn

Joined: Jan 26, 2004
Posts: 2
The user would have expanded a few nodes. All other nodes would appear in collapsed state. When user clicks on browser refresh button , i should be able to display the Tree structure as the user left (a few nodes expanded, a few nodes collapsed). How do i maintain the expanded / collapsed state of the tree nodes even after browser refresh.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTree in Browser