If the user clicks on the DoIt! button before entering data into the text fields, what happens?

A good answer might be:

Something goes wrong.

Missing Input

The program is supposed to user Integer.parseInt() with what he user entered. If the user did not enter anything this will result in an error. The error is reported in the DOS window:

D:\users\default\cs151\Notes\chap61>java  percentFat
Symantec Java! JustInTime Compiler Version 210.054 for JDK 1.1.2
Copyright (C) 1996-97 Symantec Corporation

Exception occurred during event dispatching:
java.lang.NumberFormatException:
You would get the same error if characters that could not be converted to an int were entered.

The program could be improved if it examined each string before attemting to convert it to an int. Other features of the AWT could be used to provide a more user friendly interface. This simple application can easily get more complicated.

QUESTION 17:

Is it complicated enough, for now?

Click Here after you have answered the question