|
How to create an Input Dialog Box |
|
|
An input dialog box asks a question and uses a text field to store the response.
The easiest way to create an input dialog in Java is to use
showInputDialog(Component, Object, String, int) method of JOptionPane class.
The following example uses this method to create an input dialog box:
String response = JOptionPane.showInputDialog(null,
"What is your name?",
"Enter your name",
JOptionPane.QUESTION_MESSAGE);
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.