Package javax.swing

Examples of javax.swing.JPasswordField.requestFocus()


    String retVal = null;
    JPasswordField passwordField = new JPasswordField();
    Object[] message = new Object[] {
        GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),
            "Please provide the password to open the encrypted document"), filename, passwordField };
    passwordField.requestFocus();

    if (JOptionPane.showOptionDialog(comp, message, GettextResource.gettext(Configuration.getInstance()
        .getI18nResourceBundle(), "Password request"), JOptionPane.OK_CANCEL_OPTION,
        JOptionPane.QUESTION_MESSAGE, null, null, null) == 0) {
      retVal = String.valueOf(passwordField.getPassword());
View Full Code Here


  void getPassword(boolean first) {
    JPasswordField field = new JPasswordField(box_password);
    JOptionPane.showConfirmDialog(this, field,
        FBEdit.getMessage("settings.password"),
        JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
    field.requestFocus();
    String newPass = new String(field.getPassword());
    if (newPass != null && !newPass.equals(box_password)) {
      box_password = newPass;

      if (!first)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.