package HandGUI; // using message dialogs import javax.swing.JOptionPane; public class MessageDialogExample { public static void main(String[] args) { // centered over null // title is "Message" // style is information JOptionPane.showMessageDialog(null, "First Message Very Simple"); JOptionPane.showMessageDialog( null, // window to center over "Information!", // output to show "message window title", // message box title JOptionPane.INFORMATION_MESSAGE); // style JOptionPane.showMessageDialog( null, "YOU DID A BAD!", "message window title", JOptionPane.ERROR_MESSAGE); JOptionPane.showMessageDialog( null, "Hi, I'm Clippy!", "message window title", JOptionPane.WARNING_MESSAGE); JOptionPane.showMessageDialog( null, "flavorless!", "message window title", JOptionPane.PLAIN_MESSAGE); } }