Advertisement
ganryu

Pregunta

Nov 27th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1.         public void actionPerformed(ActionEvent e)
  2.         {
  3.             JButton boton = (JButton) e.getSource();
  4.  
  5.             if (boton.getText().equals(unaPregunta.getOpcion1().toString()))
  6.             {
  7.                 contenidoTexto.setText(mensaje1); // Esto hay que cambiarlo para devolver un valor al Manejador Principal
  8.             }
  9.             else
  10.             {
  11.                 contenidoTexto.setText(mensaje2); // Esto también
  12.             }
  13.  
  14.             framePregu.add(contenidoTexto);
  15.             framePregu.setVisible(true);
  16.             framePregu.setSize(300,300);
  17.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement