How could I save the selected and opened nodes in JTree and reopen it after user restart my Application?
Asked
Active
Viewed 224 times
1
-
check whether this link is useful http://www.javalobby.org/java/forums/t19857.html – Sajith Aug 27 '12 at 11:21
-
[What have you tried?](http://www.whathaveyoutried.com/) Which part are you stuck with? – Andrew Thompson Aug 27 '12 at 11:42
-
1Possible duplicate of [Remember the values entered on standalone app on the client side](http://stackoverflow.com/questions/4661352/remember-the-values-entered-on-standalone-app-on-the-client-side) or [this question](http://stackoverflow.com/q/8282048/418556) or [this question](http://stackoverflow.com/q/7954183/418556).. – Andrew Thompson Aug 27 '12 at 11:52
-
@Sajith can you add it as an answer so I can accept it? – Feras Odeh Sep 02 '12 at 13:06
1 Answers
1
We can store the expansion state of JTree and retain it later when required. Check this code example. http://www.javalobby.org/java/forums/t19857.html

Sajith
- 2,038
- 7
- 27
- 42