swing alert

JOptionPane Display Message Swing Example

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. Example on JOptionPane using showMessageDialog() method

In the above code: null : to connect to a…