saving JTree and displaying ?
Hi,
I am new to swing and i am facing a problem in JTree. The scenerio is:
1. My program creates a JTree for a screen (lets say) screen1
2. User open some other screen, sya screen 2 and the tree gets updated.
3. There is an option for user to switch from screen2 to screen 1, and by clicling that, the old JTree should be displayed.
So what i want is to store trees for differents screens and display the JTree corresponding to that screen.
Can any1 help.
thanks in advance
Pankaj
[535 byte] By [
pbhomiaa] at [2007-10-2 19:44:46]

I have to use same treeModel but i dont know how? Let me clearify the problem more clearly:
There are two types of process in my application ( main process and sub-process). At the start of the application, I show only main processes and when the user clicks any of the main process(Lets say proc1) , it is displayed in canvas. with a JTree at top left end.showing:
ProcessHierarchy
|- proc 1
This proc1 can have SubProcesses when user clicks any of the subprocess (lets say subproc 1), in the canvas, that process is displayed with JTree as:
ProcessHierarchy
|- proc 1
|- Sub Proccess 1
Now there is a combo box in which both process are listed. when user again clicks "proc 1" in the combo-box, the canvas shows proc-1 and the JTree should be changed to previous one i.e.
ProcessHierarchy
|- proc 1
I guess the problem is more clear now . can u suggest me a way how to implement this?
Thanks in advance
Pankaj