Hey
How to i add an action lister to the OK button in a standard message dialog box??
JOptionPane.showMessageDialog(null, "Please complete the following required fields: ");
I know how to add an action lister to a custom dialog eg:
String[] question = {"Java", "C#"};
int response = JOptionPane.showOptionDialog(null, "Pick
java, Pick java", "question", 0, JOPtionPane>QUESTION_MESSAGE, null, question, question[0]);
// Action
if (response == 0) {
// Action listener here
}
Is there a way to do this with the standard JOptionPane.showMessageDialog or do i have to create a custom one to use it in this(or similar) way??
thanks