I am writing a small application in GTK+ and java, and I want it to maintain its position, size, including those of child widgets, for each session. Is there any other way instead of manually storing size of each child widgets, and recovering them at startup?
views:
45answers:
1
+2
A:
In my recent project, I used java.util.Properties
to track and save any changes I was interested in. If there's a better way to do this, it's probably serialization. javax.swing.JFrame
is Serializable, so you should theoretically be able to just save your entire frame and its non-volatile properties to disk the load it back up exactly as it was.
Gunslinger47
2009-10-26 13:50:08