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);
Source: java-tips.org
Sunday, April 04, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment