Getting user input

PGSS Computer Science Core

The ``Dlog.java'' file allows your program to get user input. Download it to your project directory and add it to the files in your project (using ``Add Files...'' in the Project menu). This will provide the following functions for you to use.

int Dlog.getInteger()
Pops up a dialog box asking the user to input an integer. The user types the number and presses return. Then the function closes the dialog box and returns the integer the user typed.
double Dlog.getDouble()
This does the same thing, except that the user types a real number, and a double is returned.
char Dlog.getCharacter()
This does the same thing, except that the user types a character, and a char is returned.