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"); } }
public void Cancel() { authentication.put("user", ""); authentication.put("pwd", ""); authentication.setLogged(false); dispose(); }