private void LoginBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LoginBtnActionPerformed
       //Get entered username and password
       String uName = UserNameField.getText();
       char[] pwd = PasswordField.getPassword();
       String pwds = new String(pwd);
       
       //Try to get user details from the database.
       User newUser = DbAccess.LoginUser(uName, pwds);
       
       if (newUser != null) //if successful
       { 
          GUI.handleLogIn(newUser);
          
         
       }
       else
       {
           errorLbl.setText("Trouble logging in!");
       }
    }//GEN-LAST:event_LoginBtnActionPerformed