checking for cancel button push in joptionpane.showinputdialog
807600Jul 28 2007 — edited Aug 30 2008I am using the following line to get input from a pop up in my program
String name = JOptionPane.showInputDialog("What is your name?");
When the pop up is displayed it shows an ok and cancel button, what can i do to check and see if the cancel button is pressed so that I can break out of that function?
Thanks for your help