private void conectBotonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_conectBotonActionPerformed
        if(userTF.getText().equals("") && passTF.getText().equals("") && ipTF.getText().equals("")
            && portTF.getText().equals("") && dbTF.getText().equals(""))
        {
            JOptionPane.showMessageDialog(this, "Empty spaces", "warning",1);
        }
        else{

            principal.setUser(user = userTF.getText());
            if(asCB.isEnabled()){
                user +=" as "+(String)asCB.getSelectedItem();
            }
            principal.setPass(pass = passTF.getText());
            principal.setIp(ip = ipTF.getText());
            principal.setPort(port = portTF.getText());
            principal.setDb(db = dbTF.getText());
            boolean exito = false;
            ServicioConexion sc = new ServicioConexion(user,pass,ip,port,db);
             try {
                exito = sc.iniciarConexion();
            } catch (Exception ex) {
                Logger.getLogger(ConexionGUI.class.getName()).log(Level.SEVERE, null, ex);
            }

            if(exito){
                principal.getTabPanel().setEnabledAt(2,true);
                principal.cargarTabla();
                ConectadoGUI con = new ConectadoGUI(this);
                JPanel conPanel = principal.getConexionPanel();
                conPanel.removeAll();
                conPanel.add(con);
                conPanel.validate();
                
            }else{
                JOptionPane.showMessageDialog(this, "Can not connect to the database", "warning",1);
            }

        }
    }//GEN-LAST:event_conectBotonActionPerformed