@Override public void windowOpened(WindowEvent evt) { m_passwordField.requestFocus(); } });
@Override public void windowOpened(WindowEvent e) { pin.requestFocus(); } });
/** * Request input focus. */ @Override public void requestFocus() { jpfPassword.requestFocus(); }
@Override public void windowOpened(WindowEvent e) { pin.requestFocus(); } });
@Override public void windowOpened(WindowEvent e) { pin.requestFocus(); } });
@Override public void windowOpened(WindowEvent e) { currentPin.requestFocus(); } });
private void jTextFieldUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldUserActionPerformed jPasswordField.setText(""); jPasswordField.requestFocus(); }//GEN-LAST:event_jTextFieldUserActionPerformed
private void jTextFieldUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldUserActionPerformed jPasswordField.setText(""); jPasswordField.requestFocus(); }//GEN-LAST:event_jTextFieldUserActionPerformed
public void passwordFocus() { this.getTxtProxyChainPassword().requestFocus(); }
public void showError(KenaiException ex) { kenaiCombo.setEnabled(true); progressBar.setVisible(false); String errorMessage = ex.getMessage(); if (errorMessage==null || "".equals(errorMessage.trim())) { errorMessage = NbBundle.getMessage(LoginPanel.class, "LBL_AuthenticationFailed"); Logger.getLogger(LoginPanel.class.getName()).log(Level.INFO, errorMessage, ex); } error.setText(errorMessage); Map<String, String> errors = ex.getErrors(); if (errors!=null) { String msg = errors.get("message");//NOI18N if (msg!=null) { error.setToolTipText(msg); } } error.setVisible(true); password.requestFocus(); setLoginButtonEnabled(true); }
public int showDialog(Component parent, String title, String subtitle) { returnValue = CONNECTION_OPTION; List<Action> actions = new ArrayList<Action>(); actions.add(connectionAction); if (otherActions != null) { actions.addAll(Arrays.asList(otherActions)); } actions.add(quitAction); dialog = new JDialogModel(parent, title, subtitle, this, actions.toArray(new Action[actions.size()]), quitAction); dialog.setResizable(false); loadPreference(); if (saveLoginBox.isSelected()) { passwordField.requestFocus(); } dialog.showDialog(); dialog.dispose(); return returnValue; }
/** * Enables/Disables the editable components in the login screen. * * @param editable true to enable components, otherwise false to disable. */ private void enableComponents(boolean editable) { // Need to set both editable and enabled for best behavior. usernameField.setEditable(editable); usernameField.setEnabled(editable && !loginAnonymouslyBox.isSelected()); passwordField.setEditable(editable); passwordField.setEnabled(editable && !loginAnonymouslyBox.isSelected()); final String lockedDownURL = Default.getString(Default.HOST_NAME); if (!ModelUtil.hasLength(lockedDownURL)) { serverField.setEditable(editable); serverField.setEnabled(editable); } if (editable) { // Reapply focus to username field passwordField.requestFocus(); } }
/** Creates new form NewJPanel */ public MasterPasswordInputPanel() { initComponents(); jPasswordField1.setText(""); jPasswordField1.requestFocus(); javax.swing.KeyStroke enter = javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0); javax.swing.text.Keymap map = jPasswordField1.getKeymap(); map.removeKeyStrokeBinding(enter); } /**
private boolean validatePanel() { String roomName = nameField.getText(); String password = new String(passwordField.getPassword()); String confirmPassword = new String(confirmPasswordField.getPassword()); boolean isPrivate = privateCheckbox.isSelected(); // Check for valid information if (!ModelUtil.hasLength(roomName)) { showError(Res.getString("message.specify.name.error")); nameField.requestFocus(); return false; } if (isPrivate) { if (!ModelUtil.hasLength(password)) { showError(Res.getString("message.password.private.room.error")); passwordField.requestFocus(); return false; } if (!ModelUtil.hasLength(confirmPassword)) { showError(Res.getString("message.confirmation.password.error")); confirmPasswordField.requestFocus(); return false; } if (!ModelUtil.areEqual(password, confirmPassword)) { showError(Res.getString("message.passwords.no.match")); passwordField.requestFocus(); return false; } } return true; }
passwordField.requestFocus();
loginPanel.getPasswordField().requestFocus();
JOptionPane.showMessageDialog(null, "Enter Password", "Missing fields", JOptionPane.DEFAULT_OPTION); txtPassword.requestFocus(); return; "Confirm your password", "Missing fields", JOptionPane.DEFAULT_OPTION); txtCPassword.requestFocus(); return; "Passwords do not match.", "ERROR", JOptionPane.DEFAULT_OPTION); txtCPassword.requestFocus(); return;