Está en la página 1de 15

Calculadora Cientfica

Introduccin: Este proyecto consiste en la creacin de una calculadora cientfica utilizando funciones de la clase MATH de java que contiene funciones avanzadas de matemticas que pueden ser utilizadas. Por otro lado, el presente proyecto intenta demostrar la forma de generar componentes en tiempo de ejecucin, esta forma de crear componentes presenta ciertas ventajas como determinar con precisin la posicin a colocar el componente, sin embargo, presenta tambin ciertas dificultades. Llamamos tiempo de diseo cuando en el formulario arrastramos los diferentes componentes y los colocamos en la posicin deseada y con las propiedades deseadas (texto, tamao, color, etc.), por otro lado, se llama tiempo de ejecucin cuando se crea el componente e indican sus propiedades mediante lneas de cdigo. Clase MATH: La clase MATH encapsula a todas las operaciones matemticas comunes a todos los lenguajes de programacin. A diferencia de otras clases, esta es de tipo public para que pueda ser llamada desde cualquier parte de un programa, sin necesidad de importarla y sus mtodos son del tipo static para evitar el instanciamiento de los mismos. Algunos de los mtodos de esta clase son: Mtodos Accin Math.pow(a, b) a elevada a la b Math.sqrt(a) Raz cuadrada Math.cbrt(a) Raz cbica Math.sin(a) Seno de a Math.cos(a) Coseno de a Math.tan(a) Tangente de a Math.rdn Nmero aleatorio Math.toRadians Convierte a radianes Math.toDegrees Convierte a grados Mtodos Math.asin(a) Math.acos(a) Math.atan(a) Math.abs(a) Math.log(a) Math.log10(a) Math.E Math.PI Math.signum(a) Accin Arco seno de a Arco coseno de a Arco tangente de a Valor absoluto de a Logaritmo natural Logaritmo base 10 Base del log natural Valor de pi Multiplica a por -1

Creacin de componentes en tiempo de ejecucin: Para crear un componente en tiempo de ejecucin deben seguirse ciertos pasos: a) Reservar espacio en memoria. Esto se logra indicando el tipo de componente y asignndole un nombre adecuado. Ejem: JButton BotonOK; b) Crear el elemento mediante el instanciamiento. Esto es indicarle a Java que genere el componente deseado. Ejem: BotonOK = new JButton(OK); c) Darle las propiedades necesarias tales como texto a mostrar, tipo de letra, etc. Ejem:
BotonOK.setFont(new java.awt.Font("Arial", 0, 11)); BotonOK.setBounds(5, 200, 50, 35);

d) Finalmente hay que mostrar el componente en el formulario, para ello es ms sencillo cuando se ha creado un panel en el formulario. Ejem: jPanel.add(BotonOK); A modo de ejemplo:
JButton BotonEliminar; BotonEliminar = new Button(Eliminar);

BotonEliminar.setFont(new java.awt.Font("Arial", 0, 11)); jPanel1.add(BotonEliminar); BotonEliminar.setBounds(12, 125, 59, 35); BotonEliminar.addActionListener(new ButtonListener());

Donde se puede observer que se esta creando un boton cuyo nombre es BotonEliminar, el texto a mostrar es Eliminar, usa letra Arial de 11 puntos en formato simple (sin negritas o cursivas), ha sido adicionado al panel jPanel1, est ubicado en las coordenas x=12, y=125; tiene un ancho de 59 pixeles y una altura de 35 pixeles y que se le ha implementado un mtodo de escucha ButtonListener() para determinar si ha sido pulsado o no. Cdigo fuente del proyecto Calculadora Cientfica:
//Importando las clases para utilizar en los componentes del formulario import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.Button; import import import import javax.swing.ButtonGroup; javax.swing.JLabel; javax.swing.JRadioButton; javax.swing.JTextField;

/* * Creacin de una calculadora cientifica para ejemplificar el uso de los * eventos de la clase MATH de java. */ public class Cientifica extends javax.swing.JFrame { // Declaracin de variables String TextoBoton[]; Button Teclas[]; JTextField Vis1, Vis2, Vis3; JLabel Etiqueta; ButtonGroup radioGroup1; JRadioButton RBSexag, RBCents, RBRadia; int x=5, y=70, conta=0, Angulo; double A, B, Rpta, M=0; //Creacin del formulario public Cientifica() { initComponents(); //Redimencionando el formulario setSize(325,465); //Cargando los elementos en el formulario IniciarComponentes(); } private void IniciarComponentes() { Teclas = new Button[44]; //Colocando los cuadros de texto en el formulario Vis1 = new JTextField(); jPanel1.add(Vis1); Vis1.setBounds(5, 5, 310, 20); Vis1.setFont(new java.awt.Font("Arial", 0, 12)); Vis1.setHorizontalAlignment(JTextField.RIGHT); Vis1.setMargin(new Insets(0,5,0,5)); Vis1.setEditable(false); Vis2 = new JTextField(); jPanel1.add(Vis2);

Vis2.setBounds(5, 24, 310, 20); Vis2.setFont(new java.awt.Font("Arial", 0, 12)); Vis2.setHorizontalAlignment(JTextField.RIGHT); Vis2.setMargin(new Insets(0,5,0,5)); Vis2.setEditable(false); Vis3 = new JTextField(); jPanel1.add(Vis3); Vis3.setBounds(5, 43, 310, 20); Vis3.setFont(new java.awt.Font("Arial", 0, 12)); Vis3.setHorizontalAlignment(JTextField.RIGHT); Vis3.setMargin(new Insets(0,5,0,5)); Vis3.setEditable(false); //Llamamos a la funcin que asigna el texto de cada una de los botones TextoBotones(); //Creacin y colocacin de los botones for (int i=0; i<4; i++) { for (int j = 0; j < 6; j++) { Teclas[conta] = new Button(TextoBoton[conta]); Teclas[conta].setFont(new java.awt.Font("Arial", 0, 11)); jPanel1.add(Teclas[conta]); Teclas[conta].setBounds(x,y,50,35); Teclas[conta].addActionListener(new ButtonListener()); x += 52; conta++; } x = 5; y += 38; } y += 5; x = 5; for (int i=0; i<4; i++) { for (int j = 0; j<5; j++) { Teclas[conta] = new Button(TextoBoton[conta]); Teclas[conta].setFont(new java.awt.Font("Arial", 0, 11)); jPanel1.add(Teclas[conta]); Teclas[conta].setBounds(x,y, 59,35); Teclas[conta].addActionListener(new ButtonListener()); x += 63; conta++; } x = 5; y += 38; } //Creacin de los botones de radio Etiqueta = new JLabel(); Etiqueta.setText("Eliga una opcin para la medida angular"); jPanel1.add(Etiqueta); Etiqueta.setFont(new java.awt.Font("Arial", 0, 12)); Etiqueta.setBounds(5, y, 250,25); radioGroup1 = new ButtonGroup(); y +=25; RBSexag = new JRadioButton("Sexagesimal", true); radioGroup1.add(RBSexag); RBSexag.setBounds (5, y, 100, 25); RBSexag.setFont(new java.awt.Font("Arial", 0, 11)); jPanel1.add(RBSexag);

RBCents = new JRadioButton("Centesimal", false); radioGroup1.add(RBCents); RBCents.setBounds (110, y, 100, 25); RBCents.setFont(new java.awt.Font("Arial", 0, 11)); jPanel1.add(RBCents); RBRadia = new JRadioButton("Radianes", false); radioGroup1.add(RBRadia); RBRadia.setBounds (215, y, 100, 25); RBRadia.setFont(new java.awt.Font("Arial", 0, 11)); jPanel1.add(RBRadia); } private void TextoBotones() { TextoBoton = new String[44]; //Array que almacena las etiquetas de los botones TextoBoton[0] = "nCr"; TextoBoton[1] = "nPr"; TextoBoton[2] = "!"; TextoBoton[3] = "^2"; TextoBoton[4] = "^3"; TextoBoton[5] = "^x"; TextoBoton[6] = ""; TextoBoton[7] = ""; TextoBoton[8] = "x"; TextoBoton[9] = "1/x"; TextoBoton[10] = "Abs"; TextoBoton[11] = ""; TextoBoton[12] = "log"; TextoBoton[13] = "10^x"; TextoBoton[14] = "ln"; TextoBoton[15] = "e^x"; TextoBoton[16] = "%"; TextoBoton[17] = "(-)"; TextoBoton[18] = "Sen"; TextoBoton[19] = "Cos"; TextoBoton[20] = "Tan"; TextoBoton[21] = "ASen"; TextoBoton[22] = "ACos"; TextoBoton[23] = "ATan"; TextoBoton[24] = "7"; TextoBoton[25] = "8"; TextoBoton[26] = "9"; TextoBoton[27] = "/"; TextoBoton[28] = "AC"; TextoBoton[29] = "6"; TextoBoton[30] = "5"; TextoBoton[31] = "4"; TextoBoton[32] = "X"; TextoBoton[33] = "Mem"; TextoBoton[34] = "3"; TextoBoton[35] = "2"; TextoBoton[36] = "1"; TextoBoton[37] = "-"; TextoBoton[38] = "RCM"; TextoBoton[39] = "0"; TextoBoton[40] = "."; TextoBoton[41] = "Rnd"; TextoBoton[42] = "+"; TextoBoton[43] = "ENTER"; } //Seccin que permite determinar el comportamiento de cada boton al ser pulsado class ButtonListener implements ActionListener { ButtonListener() { }

public void actionPerformed(ActionEvent e) { //Botones para ingresar datos if (e.getActionCommand().equals("0")) Vis3.setText(Vis3.getText() + "0"); if (e.getActionCommand().equals("1")) Vis3.setText(Vis3.getText() + "1"); if (e.getActionCommand().equals("2")) Vis3.setText(Vis3.getText() + "2"); if (e.getActionCommand().equals("3")) Vis3.setText(Vis3.getText() + "3"); if (e.getActionCommand().equals("4")) Vis3.setText(Vis3.getText() + "4"); if (e.getActionCommand().equals("5")) Vis3.setText(Vis3.getText() + "5"); if (e.getActionCommand().equals("6")) Vis3.setText(Vis3.getText() + "6"); if (e.getActionCommand().equals("7")) Vis3.setText(Vis3.getText() + "7"); if (e.getActionCommand().equals("8")) Vis3.setText(Vis3.getText() + "8"); if (e.getActionCommand().equals("9")) Vis3.setText(Vis3.getText() + "9"); if (e.getActionCommand().equals(".")) { if (Vis3.getText()!=null) Vis3.setText(Vis3.getText() + "."); else Vis3.setText(Vis3.getText() + "0."); } //Botones para realizar operaciones if (e.getActionCommand().equals("AC")) if (Vis3.getText().equals("")) { Vis1.setText(null); Vis2.setText(null); } else { Vis3.setText(""); } if (e.getActionCommand().equals("nCr")) { if (Vis3.getText().equals("")) { A = Integer.parseInt(Vis1.getText()); B = Integer.parseInt(Vis2.getText()); Vis1.setText(null); Vis2.setText(null); } else { A = Integer.parseInt(Vis2.getText()); B = Integer.parseInt(Vis3.getText()); Vis2.setText(null); Vis3.setText(null);

} Rpta = Fact(A)/(Fact(A - B) * Fact(B)); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("nPr")) { if (Vis3.getText().equals("")) { A = Integer.parseInt(Vis1.getText()); B = Integer.parseInt(Vis2.getText()); Vis1.setText(null); } else { A = Integer.parseInt(Vis2.getText()); B = Integer.parseInt(Vis3.getText()); Vis2.setText(null); Vis3.setText(null); } Rpta = Fact(A)/(Fact(A - B)); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("!")) { if (Vis3.getText().equals("")) A = Integer.parseInt(Vis2.getText()); else A = Integer.parseInt(Vis3.getText()); Rpta = Fact(A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("^2")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.pow(A, 2); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("^3")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.pow(A, 3); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("^x")) {

if (Vis3.getText().equals("")) { A = Double.parseDouble(Vis1.getText()); B = Double.parseDouble(Vis2.getText()); Vis1.setText(null); } else { A = Double.parseDouble(Vis2.getText()); B = Double.parseDouble(Vis3.getText()); } Rpta = Math.pow(A, B); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.sqrt(A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.cbrt(A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("x")) { if (Vis3.getText().equals("")) { A = Double.parseDouble(Vis1.getText()); B = Double.parseDouble(Vis2.getText()); Vis1.setText(null); } else { A = Double.parseDouble(Vis2.getText()); B = Double.parseDouble(Vis3.getText()); } Rpta = Math.pow(A,(1/B)); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("1/x")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText());

if (A!=0) { Rpta = 1/A; Vis2.setText("" + Rpta); Vis3.setText(null); } else Vis3.setText("ERROR. El valor no puede ser cero"); } if (e.getActionCommand().equals("Abs")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.abs(A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("")) { Vis3.setText("" + Math.PI); } if (e.getActionCommand().equals("log")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.log10(A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("10^x")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.pow(10,A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("ln")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.log(A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("e^x")) { if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText());

else A = Double.parseDouble(Vis3.getText()); Rpta = Math.pow(Math.E,A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("%")) { if (Vis3.getText().equals("")) { A = Double.parseDouble(Vis1.getText()); B = Double.parseDouble(Vis2.getText()); Vis1.setText(null); } else { A = Double.parseDouble(Vis2.getText()); B = Double.parseDouble(Vis3.getText()); } Rpta = A*B/100; Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("(-)")) { if (Vis3.getText().equals("")) { A = Double.parseDouble(Vis2.getText()); Rpta = -1*A; Vis2.setText("" + Rpta); } else { A = Double.parseDouble(Vis3.getText()); Rpta = -1*A; Vis2.setText("" + Rpta); Vis3.setText(null); } } if (e.getActionCommand().equals("Sen")) { if (RBSexag.isSelected() == true) Angulo = 1; if (RBCents.isSelected() == true) Angulo = 2; if (RBRadia.isSelected() == true) Angulo = 3; if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); if (Angulo == 1) A = Math.toRadians(A); else if (Angulo == 2) A = Math.PI*A/200; Rpta = Math.sin(A); Vis2.setText("" + Rpta); Vis3.setText(null); }

if (e.getActionCommand().equals("Cos")) { if (RBSexag.isSelected() == true) Angulo = 1; if (RBCents.isSelected() == true) Angulo = 2; if (RBRadia.isSelected() == true) Angulo = 3; if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); if (Angulo == 1) A = Math.toRadians(A); else if (Angulo == 2) A = Math.PI*A/200; Rpta = Math.cos(A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("Tan")) { if (RBSexag.isSelected() == true) Angulo = 1; if (RBCents.isSelected() == true) Angulo = 2; if (RBRadia.isSelected() == true) Angulo = 3; if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); if (Angulo == 1) A = Math.toRadians(A); else if (Angulo == 2) A = Math.PI*A/200; Rpta = Math.tan(A); Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("ASen")) { if (RBSexag.isSelected() == true) Angulo = 1; if (RBCents.isSelected() == true) Angulo = 2; if (RBRadia.isSelected() == true) Angulo = 3; if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.asin(A); if (Angulo == 1) Rpta = Math.toDegrees(Rpta);

else if (Angulo == 2) Rpta = Rpta*200/Math.PI; Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("ACos")) { if (RBSexag.isSelected() == true) Angulo = 1; if (RBCents.isSelected() == true) Angulo = 2; if (RBRadia.isSelected() == true) Angulo = 3; if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.acos(A); if (Angulo == 1) Rpta = Math.toDegrees(Rpta); else if (Angulo == 2) Rpta = Rpta*200/Math.PI; Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("ATan")) { if (RBSexag.isSelected() == true) Angulo = 1; if (RBCents.isSelected() == true) Angulo = 2; if (RBRadia.isSelected() == true) Angulo = 3; if (Vis3.getText().equals("")) A = Double.parseDouble(Vis2.getText()); else A = Double.parseDouble(Vis3.getText()); Rpta = Math.atan(A); if (Angulo == 1) Rpta = Math.toDegrees(Rpta); else if (Angulo == 2) Rpta = Rpta*200/Math.PI; Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("Rnd")) { if (Vis3.getText().equals("")) Vis3.setText("" + Math.random()); else { Vis1.setText(Vis2.getText()); Vis2.setText(Vis3.getText()); Vis3.setText("" + Math.random()); }

} if (e.getActionCommand().equals("/")) { if (Vis3.getText().equals("")) { A = Double.parseDouble(Vis1.getText()); B = Double.parseDouble(Vis2.getText()); Vis1.setText(null); } else { A = Double.parseDouble(Vis2.getText()); B = Double.parseDouble(Vis3.getText()); } Rpta = A/B; Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("X")) { if (Vis3.getText().equals("")) { A = Double.parseDouble(Vis1.getText()); B = Double.parseDouble(Vis2.getText()); Vis1.setText(null); } else { A = Double.parseDouble(Vis2.getText()); B = Double.parseDouble(Vis3.getText()); } Rpta = A*B; Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("-")) { if (Vis3.getText().equals("")) { A = Double.parseDouble(Vis1.getText()); B = Double.parseDouble(Vis2.getText()); Vis1.setText(null); } else { A = Double.parseDouble(Vis2.getText()); B = Double.parseDouble(Vis3.getText()); } Rpta = A-B; Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("+")) { if (Vis3.getText().equals("")) { A = Double.parseDouble(Vis1.getText()); B = Double.parseDouble(Vis2.getText()); Vis1.setText(null); }

else { A = Double.parseDouble(Vis2.getText()); B = Double.parseDouble(Vis3.getText()); } Rpta = A+B; Vis2.setText("" + Rpta); Vis3.setText(null); } if (e.getActionCommand().equals("Mem")) { if (Vis3.getText().equals("")) { A = Double.parseDouble(Vis2.getText()); M = A; Vis2.setText(null); } else { A = Double.parseDouble(Vis3.getText()); M = A; Vis3.setText(null); } } if (e.getActionCommand().equals("RCM")) { if (!Vis3.getText().equals("")) { if(!Vis2.getText().equals("")) { Vis1.setText(Vis2.getText()); Vis2.setText(Vis3.getText()); } else { Vis2.setText(Vis3.getText()); } Vis3.setText("" + M); } else Vis3.setText("" + M); } if (e.getActionCommand().equals("ENTER")) { if (!Vis3.getText().equals("")) { if(!Vis2.getText().equals("")) { Vis1.setText(Vis2.getText()); Vis2.setText(Vis3.getText()); } else { Vis2.setText(Vis3.getText()); } Vis3.setText(null); } } } } //funcin que permite calcular el factorial de un nmero public double Fact (double n)

{ int resol = 1; if (n>0) { for (int i=1; i<= n; i++) resol *= i; } else if (n==0) resol = 1; else Vis3.setText("ERROR"); return resol; } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Calculadora Cientfica"); setResizable(false); jPanel1.setBackground(new java.awt.Color(133, 184, 249)); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 300, Short.MAX_VALUE) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }// </editor-fold> public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Cientifica().setVisible(true); } }); }

// Variables declaration - do not modify private javax.swing.ButtonGroup buttonGroup1; private javax.swing.JPanel jPanel1; // End of variables declaration }

También podría gustarte