Show information message dialog with JOptionPane in Java
Description
The following code shows how to show information message dialog with JOptionPane.
Example
/* w ww .j a v a2 s . c o m*/
import javax.swing.JOptionPane;
public class Main {
public static void main(String[] args) {
JOptionPane.showMessageDialog(null,
"This is your message", "Coded Message",
JOptionPane.INFORMATION_MESSAGE);
}
}
The code above generates the following result.
Home »
Java Tutorial »
Swing »
Java Tutorial »
Swing »