wood burning stoves*
The moose likes Beginning Java and the fly likes How do you handle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How do you handle "cancel" in dialog box?" Watch "How do you handle "cancel" in dialog box?" New topic
Author

How do you handle "cancel" in dialog box?

justin kim
Greenhorn

Joined: Nov 12, 2003
Posts: 1
How do you handle the users response of "cancel" in a JOptionPane.showInputDialog dialog box?
Can anyone show me simple example?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8839
    
    7

The return value will be null if the user presses "Cancel". There's plenty of examples in the Swing Tutorial


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do you handle "cancel" in dialog box?
 
Similar Threads
How does JOptionPane return the proper value?
dialog box
CheckBox state
Java script dialog box
how to cancel a closing JInternalFrame