(WindowEvent e)
| 230 | setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); //if alt+f4 is pressed, this will cause the windowClosing event to be fired |
| 231 | addWindowListener(new WindowAdapter() { |
| 232 | @Override |
| 233 | public void windowClosing(WindowEvent e) { |
| 234 | //if alt+f4 is pressed, save the current state and terminate the app |
| 235 | Main.saveState(); |
| 236 | System.exit(0); |
| 237 | } |
| 238 | }); |
| 239 | addWindowFocusListener(new WindowAdapter() { |
| 240 | @Override |