The Code-Bin
untitled Java 5 Code
Posted by: Mark Hayes | October 3, 2010 @ 2:03am

Java 5 Code



Syntax Highlighting





Author Comments
Shows an example of how to respond the close window button (red X) in the upper-right corner of the JFrame.

Note, in addition to adding an ActionListener, you should also set the defaultCloseOperation to DO_NOTHING. (default == CLOSE_ON_EXIT).
Rating


4.60 / 8
52 Votes