I hope I'm in the right place :(
I have this code that takes input from user:
numberOfLoadsPaid = JOptionPane.showInputDialog(null,"How many loads are in this check?",
"Check Number: ", JOptionPane.QUESTION_MESSAGE);
number = Integer.parseInt(numberOfLoadsPaid);
however, if the user enters a string of characters instead of actual digits (Integer in this case) it gives me an error.
So, can someone help me put a check on this JOption Pane window so that it actually validates what's being entered?
either WHILE the user is entering the text (like with a focusListener...?)
or when user clicks on OK after entering the value.
thank you very very much for any help or documentation you can provide.