Package javax.swing

Examples of javax.swing.JPasswordField$PasswordTextKit


      JLabel label1 = new JLabel(firstLabelKey);
      label1.setSize(textBoxWidth, 5);
//      JTextField value1 = new JTextField(textBoxWidth);
      JTextField value1 = null;
      if (firstLabelKey.equalsIgnoreCase("Password:")&&(!showPasswords.isSelected())) {
        value1 = new JPasswordField(textBoxWidth);
      } else {
        value1 = new JTextField(textBoxWidth);
      }
      JLabel label2 = new JLabel(secondLabelKey);
      JTextField value2 = new JTextField(textBoxWidth);
View Full Code Here


                }

                // ----------------------------------------------------
                // construct the UI element and add it to the list
                // ----------------------------------------------------
                JPasswordField field = new JPasswordField(set, size);
                field.setCaretPosition(0);

                TwoColumnConstraints constraints = new TwoColumnConstraints();
                constraints.position = TwoColumnConstraints.WEST;

                uiElements.add(new Object[] { null, FIELD_LABEL, null, constraints, label,
View Full Code Here

     * @return a swing component for editing the object
     */
    public Component getInPlaceCustomEditor() {
       
        // init the password field
        JPasswordField textfield = new JPasswordField(value);
       
        // set its looks
        textfield.setEchoChar('*');
        textfield.setBorder(new EmptyBorder(0, 0, 0, 0));
        textfield.setMargin(new Insets(0, 0, 0, 0));
       
        // select the component's text
        textfield.selectAll();
       
        // add a key listener
        textfield.addKeyListener(new PasswordListener());
       
        // return the component
        return textfield;
    }
View Full Code Here

         */
        @Override
        public void keyReleased(KeyEvent event) {
           
            // get the event's source (in out case it would be a password field
            JPasswordField field = (JPasswordField) event.getSource();
           
            // update the edited object with the newly entered value
            value = new String(field.getPassword());
           
            // notify the listeners
            firePropertyChange();
           
            // if the enter key was pressed simulate the pressing of the
View Full Code Here

    constraints.weightx = 1;
    panel.add(comboUser, constraints);
    constraints.gridy++;

    // Password
    textPassword = new JPasswordField();
    textPassword.setText("");
    echoPassword = textPassword.getEchoChar();
    JLabel labelPassword = Utilities.createJLabel(GT._("Password :"));
    labelPassword.setLabelFor(textPassword);
    labelPassword.setHorizontalAlignment(SwingConstants.TRAILING);
View Full Code Here

   
    return passwordField;
  }
 
  protected JPasswordField createPasswordField() {
    JPasswordField temp = new JPasswordField();
   
    return temp;
  }
View Full Code Here

  protected void configureTextField(JTextField textField) {
    textField.setColumns(getTextFieldColumns());
  }

  public JPasswordField createPasswordField() {
    JPasswordField passwordField = new JPasswordField();
    configureTextField(passwordField);
    return passwordField;
  }
View Full Code Here

        /* PassPhrase */
        passPhraseTitle = new JLabel();
        passPhraseTitle.setText(mh.getMessage("passphrase_title"));
        passPhraseTitle.setForeground(GUIConstants.TITLE_FOREGROUND_COLOR);
        passPhraseTitle.setRequestFocusEnabled(true);
        passwdField = new JPasswordField(20);

        if (controller != null) {
            Document model = passwdField.getDocument();

            model.addDocumentListener(
View Full Code Here

        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        inputMessage = new JLabel(mh.getMessage("message"));

        passwdTitle = new JLabel(mh.getMessage("password"));
        passwdField = new JPasswordField(20);

        msg = panel;
        options = new Object[] { mh.getMessage("ok"), mh.getMessage("cancel") };
        setLayout();
    }
View Full Code Here

        panel = new JPanel();

        inputMessage = new JLabel(mh.getMessage("message"));

        passwdTitle = new JLabel(mh.getMessage("password"));
        passwdField = new JPasswordField(20);

        msg = panel;
        options = new Object[] { mh.getMessage("ok"), mh.getMessage("cancel") };
        setLayout();
    }
View Full Code Here

TOP

Related Classes of javax.swing.JPasswordField$PasswordTextKit

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.