I am persisting a JFrame size / state information.
I can get the height, width and extended state number; however, this information is simply not enough. For example, if a window is maximized, the height and width returned are not what it would be after returning to a normal size.
Is there a helpful way of persisting and restoring this state data, or do I simply have to switch the window to JFrame.NORMAL before reading state? Is this even sufficient for all the possible fringe cases?
Obviously, in normal, we restore to normal with the size.
When maximize_both, we want to restore the normal size then maximize_both.
When maximize_horiz or maximize_vert, I am guessing we want to restore the normal size then maximize_horiz or maximize_vert respectively. I'm not sure. Will this address the vertical and horizontal sizes appropriately? Probably.
When iconified, we want to restore the normal size then iconify -- or maybe not iconify... Not sure.
To clarify, the issue is less about the persistence mechanism and more about what to persist and how to get it from the JFrame.