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

written by objects \\ tags: , ,

Jan 31

You cannot have a modal JFrame. Use a JDialog if you need a modal window.

written by objects \\ tags: , ,