Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top