import javax.swing.JOptionPane;
public class test
{
  public static void main(String[] args)
  {
    try
    {
      String input=JOptionPane.showInputDialog(null,"please enter an integer:");
      int number=Integer.parseInt(input);
      JOptionPane.showMessageDialog(null,"the number is "+number);
    }
    catch(Exception ex)
    {
      JOptionPane.showMessageDialog(null,"incorrect input an integer is required");
    }
    System.out.println("execution continues...");
  }
}