Exemplo n.º 1
0
 public static void main(String[] args) {
   M.setWindowsTheme();
   EventQueue.invokeLater(
       new Runnable() {
         public void run() {
           try {
             FormLogin login = new FormLogin();
             login.setVisible(true);
           } catch (Exception e) {
             e.printStackTrace();
           }
         }
       });
 }
Exemplo n.º 2
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.");
   }
 }