@Override
            public void windowClosing(WindowEvent e) {
                setUserSelection(CANCEL_SELECTION);
                dispose();
            }
<code>init</code> creates the components to use the dialog.
jme3-awt-dialogs/src/main/java/com/jme3/awt/AWTSettingsDialog.java