JOptionPane return Value
Posted on 2003-03-11
Ok this may sound like a strange question but if a user clicks on OK in a JOptionPain dialog box and they have not entered anything into the field then what does it store in the string.
//store input into value
String value = JOptionPane.showInputDialog( getContentPane(), "text","title", QUESTION_MESSAGE );
//make sure the user entered a value
if ((value == null) || (value == ""))
return; // aborts the operation
yet if i just click on OK and dont enter any text the program 'continues' and does not 'return'
so what does value equal???