jan_String = JOptionPane.showInputDialog("Enter a temperature for January");
I want to iterate until the user inputs a number. I'm trying to catch an exception, but I can't seem to do that. The program (JApplet) still bombs, with a NumberFormatException in the Java console, when anything other than a number in entered. According to the Sun API, showInputDialog throws a HeadlessException. When I put the method in a try-catch, I still can't catch the exception when the input is not an integer.