Finding the restored bounds of a maximised window
I am trying to save the state of a frame so that it can be restored the next time the application is run.
If I query the bounds and the extendedState of the frame it works find if the frame is in normal or iconified state.
When the frame is maximised, getBounds returns the maximised bounds of the frame.
Is there any way to get the "restored" bounds when a frame is maximised?
I've tried setting the extended state to normal, querying the bounds and then reset to maximised, but it's a bit flickery.