A good answer might be:

Maybe, maybe not. The user would have to type both numbers before hitting "enter." This might be awkward.

Do it! Button

The user must enter both values befor the application code can be started. The listener the for two input TextFields could check that there is data in each before it proceeds. A professional program would not only do that, but would verify that all the data is correct before proceeding and would prompt the user to correct any errors.

Let us take a slighly less professional approach. This is to include a Button in the GUI that the user clicks to say "all the data is entered, now do the calculation."


QUESTION 11:

  • How many GUI components are there?
  • Which of the components will need to register a listener?

Click Here after you have answered the question