private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginButtonActionPerformed
        try {     
            String username = usernameTextField.getText();
            String password = passwordTextField.getText();
            if (password.equals("") || username.equals("")) {
              JOptionPane.showMessageDialog(this, "Udfyld venligt begge felter","Login fejl",JOptionPane.ERROR_MESSAGE);
            }else if (dbhandler.isUserCorrectPassword(username, password)) {
               Employee login = dbhandler.retrieveEmployee(username); 
                MainFrame mf = new MainFrame(login, dbhandler);
                mf.setVisible(true);
            }else{
                JOptionPane.showMessageDialog(this, "YOU FAILED!","Login fejl",JOptionPane.ERROR_MESSAGE);
            }

        } catch (SQLException ex) {
            Logger.getLogger(LoginFrame.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_loginButtonActionPerformed