So, I\'ve read the Java API, but still can\'t seem to make heads or tails about how to do this. And believe me I have tried. I want an ActionListener to cause a message box
final JOptionPane optionPane = new JOptionPane(
"The only way to close this dialog is by\n"
+ "pressing one of the following buttons.\n"
+ "Do you understand?",
JOptionPane.QUESTION_MESSAGE,
JOptionPane.YES_NO_OPTION);