When a JFrame is in a maximized state, the getBounds
method returns bounds that match its current state. What I need is the "restore bounds" (that is, the size/location of what the window would be set to if a user clicked on "Restore Down" on a Windows platform) without actually setting it to a non-maximized state.
The reason I ask is because I wish to save the bounds as a preference and then when the user reopens the application, set the window to the saved bounds (and then maximize it if that is what the last state was).
I considered adding a listener for when a window is maximized but it seems to me that the listener is notified after its maximized and I'll need to be notified right before it is maximized.