June 2017
Beginner
1296 pages
69h 23m
English
... The user can type any characters in the input dialog’s text field. Our program assumes that the user enters a valid integer. If the user clicks Cancel, showInputDialog returns null. If the user either types a noninteger value or clicks the Cancel button in the input dialog, an exception will occur and the program will not operate correctly. Lines 12– 13 display another input dialog that prompts the user to enter the second integer. Each JOptionPane dialog that you display is a so called modal dialog—while the dialog is on the screen, the user cannot interact with the rest of the application.
Read now
Unlock full access