Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How do you handle "cancel" in dialog box?

 
justin x kim
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you handle the users response of "cancel" in a JOptionPane.showInputDialog dialog box?
Can anyone show me simple example?
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The return value will be null if the user presses "Cancel". There's plenty of examples in the Swing Tutorial
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!