Documentos de Académico
Documentos de Profesional
Documentos de Cultura
DE
LA
INFORMACION
DE
LAS
MATERIA PROGRAMACION ORIENTADA A OBJETOS ALUMNO: MEJIA BALAN FRANCISCO SABINO PROYECTO: CALCULADORA BASICA EN JAVA AVANCE NMERO 3 EN ESTE AVENCE SE MOSTRARA LAS FORMAS DE MOSTRAR LOS NUMEROS EN PANTALLA.
} public void actionPerformed(ActionEvent ae) { String a = new String ("1"); if (ae.getSource()== b1){ // para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"1");
if (ae.getSource()== b2){ // para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"2"); }
if (ae.getSource()== b3){ // para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"3"); }
if (ae.getSource()== b4){// para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"4"); }
if (ae.getSource()== b5){// para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"5"); }
if (ae.getSource()== b6){// para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"6"); }
if (ae.getSource()== b7){// para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"7"); } if (ae.getSource()== b8){// para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"8"); }
if (ae.getSource()== b9){// para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"9"); } if (ae.getSource()== b10){ t1.setText(""+t1.getText()+"."); // agrega un punto b10.setEnabled(false); // desactiva el uso del punto } if (ae.getSource()== b11){// para agregar el numero indicado en comillas al cuadro de texto t1.setText(""+t1.getText()+"0"); } if (ae.getSource()== b12){ t1.setText(""); } NOTA.- el programa no est resuelto al 100%.