import javax.swing.JOptionPane; // for GUI I/O public class UsingGUI { public static void main (String[] args) { // String item; // ask the user his/her age String item = JOptionPane.showInputDialog (null, "Enter your age", "A Simple Program", JOptionPane.WARNING_MESSAGE); int entered = Integer.parseInt(item); // display the message JOptionPane.showMessageDialog (null, "I'm not sure you are " + entered + "!", "Danger", JOptionPane.ERROR_MESSAGE); // exit the program System.exit(0); } // end of main method } // end of class UsingGUI