Exemplo n.º 1
0
 @SuppressWarnings("deprecation")
 private void login() {
   if (txtUsername.getText().length() > 0 && txtPassword.getText().length() > 0) {
     User user = new User();
     user.username = txtUsername.getText();
     user.password = txtPassword.getText();
     if (user.authenticate() == true) {
       dispose();
       M.form_menu.setVisible(true);
     } else {
       clear();
     }
   } else {
     clear();
     M.messageBox("Please enter a username and a password.");
   }
 }