I am creating a parameter dialog using JOptionPane.showOptionDialog(...) ;
For the options parameter, I pass an array of JButtons, each with its own ActionListener .
One of these buttons closes the dialog box. My question is: what code do I put in the close button's event handler to close the options dialog?
Point that may matter: the class responsible for displaying this dialog box is single, and therefore the method responsible for displaying the dialog is static. Therefore, calling javax.swing.JInternalFrame.doDefaultCloseAction(); does not work "out of static context".
thanks
source share