I cannot display a Dialog!! I have been trying everything I can, I have imported javax.swing.* at the top and I am trying to use either this
JOptionPane.showMessageDialog(frame,"You finished the game!", "Winner!");
or this
JOptionPane.showMessageDialog(null, "You finished the game!", "Winner!");
This is being called somewhere in the ActionPerformed method. I am getting this error:
cannot find symbol method showMessageDialog(javax.swing.JFrame,java.lang.String,java.lang.String)
Can anybody see what I'm doing wrong here?
Why can't I get the MessageDialog to show?I don't think I'm doing anything wrong!!
Page 1 of 1
2 Replies - 598 Views - Last Post: 23 October 2010 - 05:12 AM
Replies To: Why can't I get the MessageDialog to show?
#3
Re: Why can't I get the MessageDialog to show?
Posted 23 October 2010 - 05:12 AM
Ah thanks so much, silly mistake 
I thought that if you left one of the parameters blank it would use the default option.

I thought that if you left one of the parameters blank it would use the default option.
Page 1 of 1