Codota Logo
JPasswordField.addFocusListener
Code IndexAdd Codota to your IDE (free)

How to use
addFocusListener
method
in
javax.swing.JPasswordField

Best Java code snippets using javax.swing.JPasswordField.addFocusListener (Showing top 17 results out of 315)

  • Common ways to obtain JPasswordField
private void myMethod () {
JPasswordField j =
  • Codota Iconnew JPasswordField()
  • Codota Iconnew JPasswordField(int1)
  • Codota IconString str;new JPasswordField(str)
  • Smart code suggestions by Codota
}
origin: nodebox/nodebox

@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;
}
origin: org.apache.jmeter/ApacheJMeter_core

protected PasswordEditor() {
  super();
  textField = new JPasswordField();
  textField.addActionListener(this);
  textField.addFocusListener(this);
}
origin: stackoverflow.com

accessPassword.addFocusListener( new FocusListener()
origin: stackoverflow.com

passwordField.addFocusListener(this);
buttonPanel.add(passwordField);
origin: org.netbeans.modules/org-netbeans-modules-mercurial

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();
}
origin: org.netbeans.modules/org-netbeans-modules-dlight-nativeexecution-nb

suPasswordField.addFocusListener(new java.awt.event.FocusAdapter() {
  public void focusGained(java.awt.event.FocusEvent evt) {
    hdlPasswordFieldFocus(evt);
origin: nz.ac.waikato.cms.weka/weka-stable

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));
}
origin: Waikato/weka-trunk

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));
}
origin: stackoverflow.com

field.addFocusListener(new FocusListener() {
origin: org.netbeans.modules/org-netbeans-modules-dlight-nativeexecution-nb

tfPassword.addFocusListener(new java.awt.event.FocusAdapter() {
  public void focusGained(java.awt.event.FocusEvent evt) {
    tfPasswordonPwdFocus(evt);
origin: com.eas.platypus/platypus-js-forms

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();
  });
}
origin: org.netbeans.modules/org-netbeans-modules-dlight-nativeexecution-nb

tfPassword.addFocusListener(new java.awt.event.FocusAdapter() {
  public void focusGained(java.awt.event.FocusEvent evt) {
    tfPasswordonPwdFocus(evt);
origin: uk.org.mygrid.taverna/taverna-contrib

labelConstraints.gridy++;
passwordField = new JPasswordField(connectionSettings.getPassword());
passwordField.addFocusListener(new FocusListener() {
  public void focusGained(FocusEvent e) {
origin: SimpleAmazonGlacierUploader/SAGU

secretField.setPreferredSize(buttonDimension);
secretField.setText(appProperties.getSecretKey());
secretField.addFocusListener(propertiesFocusListener);
origin: igniterealtime/Spark

serverField.addKeyListener(this);
passwordField.addFocusListener(this);
usernameField.addFocusListener(this);
serverField.addFocusListener(this);
origin: igvteam/igv

proxyPasswordField.addFocusListener(new FocusAdapter() {
  @Override
  public void focusLost(FocusEvent e) {
origin: org.netbeans.modules/org-netbeans-modules-kenai-ui

password.addFocusListener(new java.awt.event.FocusAdapter() {
  public void focusGained(java.awt.event.FocusEvent evt) {
    passwordFocusGained(evt);
javax.swingJPasswordFieldaddFocusListener

Popular methods of JPasswordField

  • <init>
  • getPassword
  • setText
  • setEnabled
  • addActionListener
  • addKeyListener
  • setColumns
  • getDocument
  • setEchoChar
  • requestFocusInWindow
  • setEditable
  • setPreferredSize
  • setEditable,
  • setPreferredSize,
  • setFont,
  • setToolTipText,
  • setName,
  • getEchoChar,
  • getText,
  • requestFocus,
  • setDocument

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now