I would like to open another window by pressing okay in JOptionPane it is possible ? if so ! give me a Light?
I would like to open another window by pressing okay in JOptionPane it is possible ? if so ! give me a Light?
Yes, just use the showConfirmDialog()
method, and validate if its return is equal to the OK button of JOPTIONPANE. If so, you instantiate your JFrame just like any other class with JFrame seuFrame = new JFrame();
See the documentation for the JOptionPane class to see how to validate the return of the button.