Tag: joption in java

JOptionPane Example Taking User Input

March 28, 2013 · 1 min read
##### JOptionPane Example: It is easy to take input using Swing. **showInputDialog()** method of **JOptionPane** displays a dialog box in which the user can enter data. The method reads the data and returns the data as a string.

JOptionPane Display Message Swing Example

March 28, 2013 · 1 min read
##### JOptionPaneSwing is used to display message to the user in a window (separate dialog box). It is the easiest way of displaying message in swing. This can be used in non-gui programs also.