1.2 Java Input Dialog Boxes

After completing this program you should be able to :

  • use an inputdialog box to accept input into a program
  • convert the text typed into the inputdialog box into a number
  • catch bad input
  • add a new method within an existing program
  • modify code to work for a different numeric data type
  • include an import statement
  • recognize methods within a program -- no parameters
Note: import javax.swing.*; statement is required for the inputDialog box

Part 1 Enter the Program


Part 2

Add a new method to the above program similar to the inputInteger() method for doubles


Comments