Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JOptionPane.showMessageDialog()  RSS feed

 
Kee Kee moon
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help.

I have JOptionPane.showMessageDialog(.....) do a sanity check on JTextField(). After I click on OK button on JOptionPane.showMessageDialog(.....), the JOptionPane.showMessageDialog(.....) should be closed. However, it keeps popping up the JOptionPane.showMessageDialog(.....).

How to make it close, so user can edit the JTextField.

Thanks
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please show us an SSCCE that shows this behaviour, because a JOptionPane dialog doesn't popup unless you tell it to.

Moving to our GUI forum.
 
Kee Kee moon
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course the JOptionPane will not pop up unless there is an error on JTextFiled. That is the purpose of using JOptionPane.showMessageDialog.
I intentionally make an error on JTextField, then JOptionPane.showMessageDialog opens. I click on OK button to close the JOptionPane, after that, it
will open the same JOptionPane.showMessageDialog again and the action keep repeating.

Please help. Thanks a lot.


Rob Spoor wrote:Please show us an SSCCE that shows this behaviour, because a JOptionPane dialog doesn't popup unless you tell it to.

Moving to our GUI forum.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help. Thanks a lot.


So where's that SSCCE?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!