Package javax.swing

Examples of javax.swing.JPasswordField$AccessibleJPasswordField


}

class PrivateField extends Field {
    public PrivateField(FormField field) {
        super(field);
        rightComp = new JPasswordField(15);
        ((JPasswordField) rightComp).setText(getFirstValue());
        ((JPasswordField) rightComp).setFont(new MJTextField().getFont());
    }
View Full Code Here


    passwordInfoLabel = new JLabel();
    passwordInfoLabel.setForeground(Color.RED);
    builder.append(passwordInfoLabel, 5);
    builder.nextLine();

    passwordTextField = new JPasswordField(Constants.DEFAULT_COLUMNS);
    settingMediator.add(Settings.PASSWORD, passwordTextField);
    passwordLabel = builder.append("", passwordTextField, 3);
    builder.nextLine();
   
    adminModeCheckBox = new JCheckBox();
    settingMediator.add(Settings.ADMIN_MODE, adminModeCheckBox);   
    adminPasswordTextField = new JPasswordField(Constants.DEFAULT_COLUMNS);
    settingMediator.add(Settings.ADMIN_PASSWORD, adminPasswordTextField);
    builder.append(adminModeCheckBox); builder.append(adminPasswordTextField, 3);
    builder.nextLine();

    adminModeCheckBox.addItemListener(new EnableListener(adminPasswordTextField));
View Full Code Here

        ivbw.add(new JLabel(language.getText("userName")));
        userNameField = new JTextField(currentUser);
        ivbw.add(userNameField);

        ivbe.add(new JLabel(language.getText("password")));
        passwordField = new JPasswordField(currentPass);
        ivbe.add(passwordField);

        hb.add(ivbw);
        hb.add(ivbe);
View Full Code Here

        /*
         * passwordPanel.add(tfPassword = new JPasswordField(),
         * BorderLayout.CENTER); vb.add(passwordPanel); vb.add(new JPanel());
         */
        vbServer.add(passwordPanel);
        vbServer.add(tfPassword = new JPasswordField());
        vbServer.add(new JPanel());

        JPanel serverPanel = new JPanel(new BorderLayout());
        serverPanel.add(vbServer, BorderLayout.NORTH);
        vb.add(serverPanel);
View Full Code Here

        mUser.addActionListener(this);
        controls.add(mUser);
        controls.add(Box.createVerticalGlue());

        mPassword = new JPasswordField("");

        mPassword.addActionListener(this);
        controls.add(mPassword);
        controls.add(Box.createVerticalGlue());
        controls.add(Box.createVerticalStrut(10));
View Full Code Here

          0, 0);
      WidgetUtils.addToGridBag(loggedInLabel, this, 0, 1);
    } else {
      final JXTextField usernameTextField = new JXTextField();
      usernameTextField.setColumns(15);
      final JPasswordField passwordTextField = new JPasswordField(15);

      final JButton registerButton = WidgetFactory.createButton("Register", "images/actions/website.png");
      registerButton.addActionListener(new OpenBrowserAction("http://datacleaner.eobjects.org/?register"));

      final JButton loginButton = WidgetFactory.createButton("Login", "images/actions/login.png");
      loginButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
          String username = usernameTextField.getText();
          char[] password = passwordTextField.getPassword();
          if (StringUtils.isNullOrEmpty(username) || password == null || password.length == 0) {
            JOptionPane.showMessageDialog(LoginPanel.this, "Please enter a username and a password.",
                "Invalid credentials", JOptionPane.ERROR_MESSAGE);
          } else {
            boolean authenticated = _authenticationService.auth(username, password);
View Full Code Here

      }
    });
    WidgetUtils.addToGridBag(new JLabel("Username"), proxyAuthPanel, 0, 0);
    WidgetUtils.addToGridBag(proxyUsernameField, proxyAuthPanel, 1, 0);

    final JPasswordField proxyPasswordField = new JPasswordField(_userPreferences.getProxyPassword());
    proxyPasswordField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        _userPreferences.setProxyPassword(String.valueOf(proxyPasswordField.getPassword()));
      }
    });
    WidgetUtils.addToGridBag(new JLabel("Password"), proxyAuthPanel, 0, 1);
    WidgetUtils.addToGridBag(proxyPasswordField, proxyAuthPanel, 1, 1);

    WidgetUtils.addToGridBag(proxyAuthCheckBox, proxyPanel, 0, 2, 2, 1);
    WidgetUtils.addToGridBag(proxyAuthPanel, proxyPanel, 0, 3, 2, 1);

    ActionListener actionListener = new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        proxyHostField.setEnabled(proxyCheckBox.isSelected());
        proxyPortField.setEnabled(proxyCheckBox.isSelected());
        proxyAuthCheckBox.setEnabled(proxyCheckBox.isSelected());
        proxyUsernameField.setEnabled(proxyAuthCheckBox.isSelected() && proxyCheckBox.isSelected());
        proxyPasswordField.setEnabled(proxyAuthCheckBox.isSelected() && proxyCheckBox.isSelected());
      }
    };
    proxyCheckBox.addActionListener(actionListener);
    proxyAuthCheckBox.addActionListener(actionListener);
View Full Code Here

        }
      }
    });

    _usernameTextField = WidgetFactory.createTextField("Username");
    _passwordField = new JPasswordField(17);

    if (_originalDatastore != null) {
      // the database driver has to be set as the first thing, because the
      // combobox's action listener will set other field's values as well.
      DatabaseDriverDescriptor databaseDriver = DatabaseDriverCatalog
View Full Code Here

    usernameLabel = new JLabel("Choose a username");
    usernameField = new JTextField();
    usernameField.setDocument(new LowerCaseLetterDocument());

    passwordLabel = new JLabel("Choose a password");
    passwordField = new JPasswordField();

    passwordretypeLabel = new JLabel("Retype password");
    passwordretypeField = new JPasswordField();

    emailLabel = new JLabel("E-mail address (optional)");
    emailField = new JTextField();

    // createAccountButton
View Full Code Here

    c.gridx = 0;
    c.gridy = 4;
    c.fill = GridBagConstraints.NONE;
    contentPane.add(l, c);

    passwordField = new JPasswordField();

    c.gridx = 1;
    c.gridy = 4;
    c.fill = GridBagConstraints.BOTH;
    contentPane.add(passwordField, c);
View Full Code Here

TOP

Related Classes of javax.swing.JPasswordField$AccessibleJPasswordField

Copyright © 2018 www.massapicom. 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.