Create a message dialog with default settings using JOptionPane in Java
Description
The following code shows how to create a message dialog with default settings using JOptionPane.
Example
//from w w w . j av a 2s.c om
import javax.swing.JOptionPane;
public class Main {
public static void main(String[] args) {
JOptionPane.showMessageDialog(null, "Thank you!");
}
}
The code above generates the following result.
Home »
Java Tutorial »
Swing »
Java Tutorial »
Swing »