A continuacion LES PASO ESTE CÓDIGO PARA QUE LO REVISEN, ES UNA CALCULADORA BÁSICA UTILIZANDO VENTANAS EMERGENTES, Y Decimales, MODIFIQUEN COMO USTEDES QUIERAN SE LOS DEJO, DIVIERTANSE, SALUDOS ....

NUEVO EJEMPLO // AQUI VA EL TITULO DE SU PROUECTO //
javax.swing Importar. *;
Importar java.awt. *;
public class Calcular
{
static void main (String args []) Públicos
{
doble a, b, s, r, m, d; // Las variables de tipo de doble Parr Decimales
a = Double.parseDouble (JOptionPane.showInputDialog ("DAME A:"));
// EL Double.parseDouble convierte numero ONU el texto
b = Double.parseDouble (JOptionPane.showInputDialog ("DAME B:"));
s = a + b;
r = ab;
m = a * b;
d = a / b;
// imprimimos Resultados
JOptionPane.showMessageDialog (null, "LA SUMA ES:" + s);
JOptionPane.showMessageDialog (null, "LA RESTA ES:" + r);
JOptionPane.showMessageDialog (null, "La multiplicación ES:" + m);
JOptionPane.showMessageDialog (null, "LA DIVISIÓN ES:" + d);
// O EN CONSOLA ES LO MISMO
System.out.print ("LA SUMA ES:" + s);
// terminamos Listo
// Otra Manera de correrlo
}
}