Ejemplo n.º 1
0
 private void jButton2ActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton2ActionPerformed
   try {
     OrganizadorPartidos.getInstance().logout();
   } catch (CadenaVacia | ObjetoVacio | FechaErronea | NumeroIncorrecto | ErrorConexionBd ex) {
     // Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
   }
   System.exit(1);
 } // GEN-LAST:event_jButton2ActionPerformed
Ejemplo n.º 2
0
 private void jButton1ActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton1ActionPerformed
   // TODO add your handling code here:
   String correo = jTextField1.getText();
   String pass = new String(jPasswordField1.getPassword());
   Usuario login;
   try {
     login = org.login(correo, pass);
     Principal p = new Principal();
     p.setVisible(true);
     this.setVisible(false);
   } catch (ObjetoVacio | NoEncontrado e) {
     jTextField1.setText("");
     jPasswordField1.setText("");
     JOptionPane.showMessageDialog(
         this, "Email o password incorrecto", "Error", JOptionPane.WARNING_MESSAGE);
   }
 } // GEN-LAST:event_jButton1ActionPerformed
Ejemplo n.º 3
0
 /** Creates new form Login */
 public Login() throws CadenaVacia, ErrorConexionBd, FechaErronea, NumeroIncorrecto, ObjetoVacio {
   initComponents();
   org = OrganizadorPartidos.getInstance();
   this.setLocationRelativeTo(null);
 }