I have a pretty big swing application and i want to make it remember sizes of all windows, jframes etc. So if user resized window how he likes, next time the window looks exact the same way.
Do i have a better option to solve it, but manually write the position/size of each window in Preferences? Is there any convinient way to store the order of columns in JTable? May be some framework? Just don't want to write boilerplate.
Serialization of the whole big app is unfortunately not an option.
No, there isn't. Don't forget to write the bounds (position/size) of the main JFrame.
And after restoring window position don't forget to check if the position is really in displayed desktop area. The screen configuration may change between application runs (eg. when the user disconnects laptop from a desktop monitor).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With