Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/12/2010, 03:53
Avatar de oscarsb1988
oscarsb1988
 
Fecha de Ingreso: abril-2010
Mensajes: 40
Antigüedad: 14 años
Puntos: 0
Respuesta: Recorrer HashTable y sacar elemento

Lo acabo de solucionar XD

Código JAVA:
Ver original
  1. if (ClienteOro.CliOro.contains(jTextField1.getText()))
  2.          {
  3.              String ClienteF = jTextField1.getText(); //Variable para pasar al nombre de Vfactura
  4.          }
  5.  
  6.          String pass1 = new String(jPasswordField1.getPassword());
  7.  
  8.          if (ClienteOro.CliOro.containsKey(pass1) == true)
  9.          {
  10.                 existe = 1;
  11.                 new Vcompra().setVisible(true);
  12.                 new Vloguin().setVisible(false);
  13.          }
  14.  
  15.         //Si no existe, mostramos mensaje de error.
  16.  
  17.         if (existe == 0)
  18.         {
  19.             JOptionPane.showMessageDialog(null, "Los datos introducidos no son correctos", "", JOptionPane.WARNING_MESSAGE);
  20.             jTextField1.setText("");
  21.             jPasswordField1.setText("");
  22.             jTextField1.requestFocus();
  23.             jPasswordField1.requestFocus();
  24.         }