Why does my JFrame go away after I choose system close on the window?
Ans : Assume that you have a Swing JFrame component, and you handle the windowClosing event, but do nothing in the handler. You will see that the JFrame disappears anyway. The reason is that JFrame’s have default handling of the system close operation, separate from the windowClosing event. You have to override that by calling: setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); on your JFrame.