MCPcopy Index your code
hub / github.com/adolfintel/NoteBot / windowClosing

Method windowClosing

StickyNotes/src/com/dosse/stickynotes/Note.java:232–237  ·  view source on GitHub ↗
(WindowEvent e)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

saveStateMethod · 0.95

Tested by

no test coverage detected