InputDialog & MessageDialog HELP?!
Hello, as you can see, I am new.. I am Student programmer and need help from you wise seniors!
I have to have a InputDialog asking if the package is being picked up. If so, I have to add a 2$ fee.
My program asks me if it is being picked up and w/e I type in the box, NOTHING HAPPENS! No message error like I thought I had and the machine has to be reseted..
Any help would be greatly appreciated!
boolean yesPickUp = false;
boolean noPickUp = false;
inputString = JOptionPane.showInputDialog("Are you picking up the Package?" +
" Please enter \"Yes\" or \"No\"");
inputString = readString();
if ((inputString == "yes")||(inputString == "Yes"))
yesPickUp = true;
pickUp = 2.00;
else if ((inputString == "no")||(inputString == "no"))
noPickUp = true;
pickUp = 0.;
JOptionPane.showMessageDialog(null, "***Error - Invalid entry! Exiting!***");
return; // quit the method.