I wrote some code to override the JFrame's minimize event, but I am not sure it is the best it could be.
The part I know could be better is the == 1. Is there a constant I can compare to to tell that the JFrame is minimized? What is the proper way to tell if a JFrame is minimzed/maximized.
Also, once it is minimized, how can I force it to maximize/restore?
You should look at java.awt.Frame for the constants; in this case Frame.ICONIFIED.
For setting the new state there is method setExtendedState that takes these values as well - Frame.NORMAL, Frame.ICONIFIED, Frame.MAXIMIZED_HORIZ, Frame.MAXIMIZED_VERT and Frame.MAXIMIZED_BOTH.