示例#1
0
文件: LoginUI.java 项目: omusico/siga
  public void OK() {
    if (((String) serverURLField.getText() == null)
        || (((String) serverURLField.getText()).length() == 0)) {
      return;
    }

    authentication.put("user", (String) usernameField.getText());
    authentication.put("pwd", new String(passwordField.getPassword()));
    authentication.put("server", (String) serverURLField.getText());

    if (authentication.isValidUser()) {
      authentication.setLogged(true);
      dispose();
    } else {
      usernameField.setText("");
      passwordField.setText("");
      if (isFirstLogin) {
        invalidLoginLabel.setVisible(true);
        isFirstLogin = false;
      }
      // JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),"Invalid
      // user/password");
    }
  }