JOptionPane.showConfirmDialog(null, instructorEditorPanel,
"Edit Player JOptionPane", JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE);
instructorEditorPanel is a Jpanel with 3 textfields. I am trying to obtain the data in the textFields and assign them to instance variables within the parent class. I know how to get the data using the getText() method. My problem is rigging the handler to perform an action when the OK button is selected.
In this case, the showConfirmDialog() will return 0 when click the OK button. You can do something like this:
Obviously, you need to have access to the JPanel or the JTextField instance.