Nov 20
|
Often you want to do something when the user closes your dialog window. To achieve this you can use a WindowListener the same way you would for a JFrame.
dialog.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { // dialog is closing, you can perform your action here } });