GUI INPUT
import javax.swing.*;
public class Guiinput
{
public static void main(String args[])
{
int a,b,c;
String r,s;
r = JOptionPane.showInputDialog("Enter First Number: ");
a = Integer.parseInt(r);
s = JOptionPane.showInputDialog("Enter Second Number: ");
b = Integer.parseInt(s);
c=a+b;
JOptionPane.showMessageDialog(null,"The Sum of "+a+" and "+b+" is: "+c);
}
}
import javax.swing.*;
public class Guiinput
{
public static void main(String args[])
{
int a,b,c;
String r,s;
r = JOptionPane.showInputDialog("Enter First Number: ");
a = Integer.parseInt(r);
s = JOptionPane.showInputDialog("Enter Second Number: ");
b = Integer.parseInt(s);
c=a+b;
JOptionPane.showMessageDialog(null,"The Sum of "+a+" and "+b+" is: "+c);
}
}