if( igual == ae.getSource()){s = Float.parseFloat(t1.getText()); switch ( operador ) {case 1 :t1.setText(""+(n+s));break;case 2 :t1.setText(""+(n-s));break;case 3 :t1.setText(""+(n*s));break;case 4 :t1.setText(""+(n/s));break; } punto.setEnabled(true);igual.setEnabled(false);}
Es un blog Educativo de ejercicios de Java con Applets
1 comentarios:
if( igual == ae.getSource()){
s = Float.parseFloat(t1.getText());
switch ( operador ) {
case 1 :t1.setText(""+(n+s));break;
case 2 :t1.setText(""+(n-s));break;
case 3 :t1.setText(""+(n*s));break;
case 4 :t1.setText(""+(n/s));break;
}
punto.setEnabled(true);
igual.setEnabled(false);
}
Publicar un comentario