Swing Application visual state persistence

Hello,

I have a complex SWING application and I would like to save the state of the JComponents on it when the application quits. Then use that state when I run the application again to set the JSPlitpane , floating toolbars, internal frames and the like into the same state that they were when the application was exited before. I am not speaking about the "model", I already save all the necesary data such as text and other data part of my application model.

I saw, a while ago, some API that took care of this kind of functionality, but I can't find it now.

Could anyone tell me how do they achieve this kind of functionality?

Of course I could save a Properties file ( or Preferences in the registry ) with the location and size and other properties from each of the JComponents on my application, but this seems very tedious work.

Thank you for the help,

Alfonso

[912 byte] By [sanchez_pausa] at [2007-11-27 10:56:20]
# 1

http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html

drawimagea at 2007-7-29 12:02:20 > top of Java-index,Desktop,Core GUI APIs...
# 2

how to implement serialization:

http://java.sun.com/developer/technicalArticles/Programming/serialization/

Yannixa at 2007-7-29 12:02:20 > top of Java-index,Desktop,Core GUI APIs...
# 3

There is just an article on java.sun.com about the new Swing Application Framework (JSR 296). This framework seems to support to save the state of an application. First versions (not final, I think) are already available:

http://java.sun.com/developer/technicalArticles/javase/swingappfr/

https://appframework.dev.java.net/

-Puce

Pucea at 2007-7-29 12:02:20 > top of Java-index,Desktop,Core GUI APIs...