. 1 public static void main (String [] args) { 2 // without icons . 3 Toolkit.getDefaultToolkit () BEEP ();. . 4 JOptionPane.showMessageDialog ( null , "information", "heading" , JOptionPane.PLAIN_MESSAGE); . 5 // band? Icon 6 JOptionPane.showMessageDialog ( null , "information", "title" , JOptionPane.QUESTION_MESSAGE); 7 // with a warning icon 8 JOptionPane.showMessageDialog ( null , "information", "title" , JOptionPane.WARNING_MESSAGE); 9 // with warning icon 10 JOptionPane.showMessageDialog ( null , "information", "heading" , JOptionPane.INFORMATION_MESSAGE); . 11 // with an error icon 12 is JOptionPane.showMessageDialog ( null , "information", "heading" , JOptionPane.ERROR_MESSAGE); 13 is }