@Override protected JTextComponent createField() { JPasswordField field = new JPasswordField(); field.putClientProperty("JComponent.sizeVariant", "small"); field.setFont(Theme.SMALL_BOLD_FONT); field.addActionListener(this); field.addFocusListener(new FocusAdapter() { public void focusLost(FocusEvent e) { commitTextFieldValue(); } }); return field; }
protected PasswordEditor() { super(); textField = new JPasswordField(); textField.addActionListener(this); textField.addFocusListener(this); }
accessPassword.addFocusListener( new FocusListener()
passwordField.addFocusListener(this); buttonPanel.add(passwordField);
private void initPanel() { repositoryPanel = new RepositoryPanel(); urlComboEditor = (JTextComponent) repositoryPanel.urlComboBox .getEditor().getEditorComponent(); urlDoc = urlComboEditor.getDocument(); usernameDoc = repositoryPanel.userTextField.getDocument(); passwordDoc = repositoryPanel.userPasswordField.getDocument(); tunnelCmdDoc = repositoryPanel.tunnelCommandTextField.getDocument(); DocumentListener documentListener = new DocumentChangeHandler(); urlDoc.addDocumentListener(documentListener); passwordDoc.addDocumentListener(documentListener); usernameDoc.addDocumentListener(documentListener); tunnelCmdDoc.addDocumentListener(documentListener); repositoryPanel.savePasswordCheckBox.addItemListener(this); repositoryPanel.urlComboBox.addItemListener(this); repositoryPanel.proxySettingsButton.addActionListener(this); repositoryPanel.userPasswordField.addFocusListener(this); tweakComboBoxEditor(); }
suPasswordField.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { hdlPasswordFieldFocus(evt);
public PasswordField(String label) { setLayout(new BorderLayout()); m_label = new JLabel(label); if (label.length() > 0) { m_label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); } add(m_label, BorderLayout.WEST); m_password = new JPasswordField(); m_password.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { super.keyReleased(e); m_support.firePropertyChange("", null, null); } }); m_password.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { super.focusLost(e); m_support.firePropertyChange("", null, null); } }); add(m_password, BorderLayout.CENTER); // setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); }
public PasswordField(String label) { setLayout(new BorderLayout()); m_label = new JLabel(label); if (label.length() > 0) { m_label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); } add(m_label, BorderLayout.WEST); m_password = new JPasswordField(); m_password.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { super.keyReleased(e); m_support.firePropertyChange("", null, null); } }); m_password.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { super.focusLost(e); m_support.firePropertyChange("", null, null); } }); add(m_password, BorderLayout.CENTER); // setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); }
field.addFocusListener(new FocusListener() {
tfPassword.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { tfPasswordonPwdFocus(evt);
public VPasswordField(String aText) { super.setText(aText != null ? aText : ""); if (aText == null) { nullValue = true; } oldValue = aText; super.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { checkValueChanged(); } }); super.addActionListener((java.awt.event.ActionEvent e) -> { checkValueChanged(); }); }
tfPassword.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { tfPasswordonPwdFocus(evt);
labelConstraints.gridy++; passwordField = new JPasswordField(connectionSettings.getPassword()); passwordField.addFocusListener(new FocusListener() { public void focusGained(FocusEvent e) {
secretField.setPreferredSize(buttonDimension); secretField.setText(appProperties.getSecretKey()); secretField.addFocusListener(propertiesFocusListener);
serverField.addKeyListener(this); passwordField.addFocusListener(this); usernameField.addFocusListener(this); serverField.addFocusListener(this);
proxyPasswordField.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) {
password.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { passwordFocusGained(evt);