Quote
The way I got it working (clean and fast) was to NOT extend JFrame (like GameFrame) and maintain 2 protected JFrames. The other key was to remove the Insets for the Windowed frame, as below (an extension of JFrame that has this method):
One slight problem with this is that the Insets are not set if you call:
| 1 | JFrame.setDefaultLookAndFeelDecorated(true); |
I added a comment about this to this bug report:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5050922
As a side note, when using a KeyListener to switch modes (with ALT-ENTER), it is necessary to put the code in keyReleased instead of keyTyped, as the keyTyped never gets an "ALT-ENTER" key.
| 1 2 3 4 5 | public void keyReleased(KeyEvent event) |



