[Original] .1 the Swing techniques: minimal code with the default setting set the default event frame closing off events JFrame, JDialog, JInternalFrame effective setDefaultCloseOperation (EXIT_ON_CLOSE); available parameters in javax.swing.WindowConstants (JFrame, JDialog, JInternalFrame are Implemented) Do_Nothing_on_close = 0; hide_on_close = 1; dispose_on_close = 2; EXIT_ON_CLOSE = 3;