import javax.swing.JOptionPane;
public class Addition {
	public static void main(String[] args) {
	String firstnumber = JOptionPane.showInputDialog("Enter first Integer");
	// showInputDialog is thus a static method since it is invoked with the classname
	String secondnumber = JOptionPane.showInputDialog("Enter second Integer");
	int number1 = Integer.parseInt(firstnumber);
	int number2 = Integer.parseInt(secondnumber);
	// parseInt is a static method of the class Integer than converts a String to an integer
	int sum = number1 + number2;
	JOptionPane.showMessageDialog(null, "The sum is " + sum, "Sum of 2 Integers",JOptionPane.PLAIN_MESSAGE);
	// showMessageDialog is a static method of the class JOptionPane
	// first argument controls positioning - null means center of screen
	// second argument is the message to display
	// third argument specifies the title barof the dialog box
	// fourth argument specifies whether an icon will be display to the left of the message
	// ERROR_MESSAGE, INFORMATION_MESSAGE,WARNING_MESSAGE, and QUESTION_MESSAGE are other constants
	// for the fourth argument
	}
	}