Better than JOptionPane
My question is rather inputing using annoying
JOptionPane.showInputDialog popups, can we have just one window where
all inputs can be taken side by side :
For example : This is what I want :
Customer Name : (input)
Credit Card : (input
blah : (input)
blah :(input)
finally : you click Next or Ok
all inputs on a single window..
What I don't want :
Customer Name :input (Popup)
After inputtiing,
another pop up comes with Credit Car input
Its annoying you know..Please help me with this..
Below is a part of my main class called Hotel :
String cName = JOptionPane.showInputDialog("Customer Name:");
if(cName == null)
{
return;
}
//-------------------------------------------------------------------------------
//The name is stored, and now we try to get an integer-format
credit card number.
inputValid = false;
while(inputValid == false)
{
inputValid = true;
tempString = JOptionPane.showInputDialog("Enter Credit Card #");
if(tempString == null)
{
return;
}
try
{
credit_num = Integer.decode(tempString);
}
catch(NumberFormatException NumberFormatException)
{
JOptionPane.showMessageDialog(null, "Credit card # must be an
integer.", "Incorrect Format",
JOptionPane.ERROR_MESSAGE);
inputValid = false;
}
}