Tabnine Logo
JPasswordField.setEditable
Code IndexAdd Tabnine to your IDE (free)

How to use
setEditable
method
in
javax.swing.JPasswordField

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

origin: nz.ac.waikato.cms.weka/weka-stable

 /**
  * Set the editable status of the password box.
  *
  * @param editable true if the password box is editable
  */
 public void setEditable(boolean editable) {
  m_password.setEditable(editable);
 }
}
origin: Waikato/weka-trunk

 /**
  * Set the editable status of the password box.
  *
  * @param editable true if the password box is editable
  */
 public void setEditable(boolean editable) {
  m_password.setEditable(editable);
 }
}
origin: orbisgis/orbisgis

public void setEditable(boolean b) {
  comp.setEditable(b);
}
origin: orbisgis/orbisgis

  /**
   * Builds a new {@code PasswordType}.
   * @param columns
   *  The number of columns for the underlying component.
   * @param isEditable
   *  To specify if the component can be edited or not.
   */
  public PasswordType(int columns, boolean isEditable) {
  comp.setColumns(columns);
      comp.setEditable(isEditable);
}
origin: net.java.openjdk.cacio/cacio-shared

@Override
public void setEditable(boolean editable) {
  
  getSwingComponent().setEditable(editable);
}
origin: martin-lizner/trezor-ssh-agent

private void addLabelArea() {
  labelPanel.setLayout(new GridLayout(3, 1));
  Border labelsPadding = BorderFactory.createEmptyBorder(0, 0, 15, 0);
  labelPanel.setBorder(labelsPadding);
  deviceLabel = new JLabel(AgentConstants.APP_PUBLIC_NAME.toUpperCase());
  Icon icon = new ImageIcon(TrayProcess.createImage(AgentConstants.ICON24_PATH, AgentConstants.ICON_DESCRIPTION));
  deviceLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
  deviceLabel.setIcon(icon);
  deviceLabel.setIconTextGap(10);
  deviceLabel.setFont(new Font(null, Font.BOLD, 15));
  passcodeLabel = new JLabel(LocalizedLogger.getLocalizedMessage("DIALOG_ENTER_PIN"));
  passcodeField = new JPasswordField(3);
  passcodeField.setEditable(false);
  passcodeField.setBackground(Color.white);
  labelPanel.add(deviceLabel, BorderLayout.NORTH);
  labelPanel.add(passcodeLabel, BorderLayout.CENTER);
  labelPanel.add(passcodeField, BorderLayout.SOUTH);
}
origin: igniterealtime/Spark

/**
 * 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();
  }
}
origin: xipki/xipki

passwordField.setEditable(false);
origin: org.glassfish.main.security/security

public void actionPerformed(ActionEvent ae) {
  char[] passKPFromUser = keystorePassword.getPassword();
  if (sslUtils.verifyMasterPassword(passKPFromUser)) {
  okForKP.setEnabled (false);
  cancelForKP.setEnabled (false);
  keystorePassword.setEditable (false);
  CardLayout cl = (CardLayout) (getContentPane ()).getLayout ();
  cl.show (getContentPane (), pnlCertificateList);
  } else {
  String errmessage = localStrings.getLocalString("enterprise.security.IncorrectKeystorePassword","Incorrect Keystore Password");
  GUIErrorDialog guierr = new GUIErrorDialog(errmessage);
  guierr.setVisible(true);
  }
      Arrays.fill(passKPFromUser, ' ');
}
});            
origin: org.glassfish.security/security

public void actionPerformed(ActionEvent ae) {
  char[] passKPFromUser = keystorePassword.getPassword();
  if (sslUtils.verifyMasterPassword(passKPFromUser)) {
  okForKP.setEnabled (false);
  cancelForKP.setEnabled (false);
  keystorePassword.setEditable (false);
  CardLayout cl = (CardLayout) (getContentPane ()).getLayout ();
  cl.show (getContentPane (), pnlCertificateList);
  } else {
  String errmessage = localStrings.getLocalString("enterprise.security.IncorrectKeystorePassword","Incorrect Keystore Password");
  GUIErrorDialog guierr = new GUIErrorDialog(errmessage);
  guierr.setVisible(true);
  }
      Arrays.fill(passKPFromUser, ' ');
}
});            
origin: org.xhtmlrenderer/core-renderer

public JComponent create() {
  JPasswordField password = new JPasswordField();
  if (hasAttribute("size")) {
    int size = GeneralUtil.parseIntRelaxed(getAttribute("size"));
    
    // Size of 0 doesn't make any sense, so use default value
    if (size == 0) {
      password.setColumns(15);
    } else {
      password.setColumns(size);
    }
  } else {
    password.setColumns(15);
  }
  if (hasAttribute("maxlength")) {
    password.setDocument(
        new SizeLimitedDocument(
            GeneralUtil.parseIntRelaxed(getAttribute("maxlength"))));
  }
  if (hasAttribute("readonly") &&
      getAttribute("readonly").equals("readonly")) {
    password.setEditable(false);
  }
  return password;
}

origin: danfickle/openhtmltopdf

public JComponent create() {
  JPasswordField password = new JPasswordField();
  if (hasAttribute("size")) {
    int size = GeneralUtil.parseIntRelaxed(getAttribute("size"));
    
    // Size of 0 doesn't make any sense, so use default value
    if (size == 0) {
      password.setColumns(15);
    } else {
      password.setColumns(size);
    }
  } else {
    password.setColumns(15);
  }
  if (hasAttribute("maxlength")) {
    password.setDocument(
        new SizeLimitedDocument(
            GeneralUtil.parseIntRelaxed(getAttribute("maxlength"))));
  }
  if (hasAttribute("readonly") &&
      getAttribute("readonly").equalsIgnoreCase("readonly")) {
    password.setEditable(false);
  }
  return password;
}

origin: net.java.openjdk.cacio/cacio-shared

@Override
JPasswordField initSwingComponent() {
  
  TextField textField = getAWTComponent();
  JPasswordField swingComponent = new JPasswordField();
  swingComponent.setText(textField.getText());
  swingComponent.setColumns(textField.getColumns());
  swingComponent.setEchoChar(textField.getEchoChar());
  swingComponent.setEditable(textField.isEditable());
  swingComponent.select(textField.getSelectionStart(),
             textField.getSelectionEnd());
  
  swingComponent.addActionListener(new SwingTextFieldListener());
  return swingComponent;
}

origin: org.docx4j/xhtmlrenderer

public JComponent create() {
  JPasswordField password = new JPasswordField();
  if (hasAttribute("size")) {
    int size = GeneralUtil.parseIntRelaxed(getAttribute("size"));
    
    // Size of 0 doesn't make any sense, so use default value
    if (size == 0) {
      password.setColumns(15);
    } else {
      password.setColumns(size);
    }
  } else {
    password.setColumns(15);
  }
  if (hasAttribute("maxlength")) {
    password.setDocument(
        new SizeLimitedDocument(
            GeneralUtil.parseIntRelaxed(getAttribute("maxlength"))));
  }
  if (hasAttribute("readonly") &&
      getAttribute("readonly").equalsIgnoreCase("readonly")) {
    password.setEditable(false);
  }
  return password;
}
 
origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

public JComponent create() {
  JPasswordField password = new JPasswordField();
  if (hasAttribute("size")) {
    int size = GeneralUtil.parseIntRelaxed(getAttribute("size"));
    
    // Size of 0 doesn't make any sense, so use default value
    if (size == 0) {
      password.setColumns(15);
    } else {
      password.setColumns(size);
    }
  } else {
    password.setColumns(15);
  }
  if (hasAttribute("maxlength")) {
    password.setDocument(
        new SizeLimitedDocument(
            GeneralUtil.parseIntRelaxed(getAttribute("maxlength"))));
  }
  if (hasAttribute("readonly") &&
      getAttribute("readonly").equalsIgnoreCase("readonly")) {
    password.setEditable(false);
  }
  return password;
}

origin: AndreasFagschlunger/O2Xfs

gbc.insets.top = 5;
pinField = new JPasswordField();
pinField.setEditable(false);
frame.add(pinField, gbc);
javax.swingJPasswordFieldsetEditable

Popular methods of JPasswordField

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

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Runner (org.openjdk.jmh.runner)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now