Package java.awt

Examples of java.awt.TextField.requestFocus()


        TextField text = new TextField(defaultText, textWidth == -1 ? 15 : textWidth);
        middle.add(text);
        p.add(middle, "Center"); //$NON-NLS-1$
        if (echoCharacter != ' ')
            text.setEchoChar(echoCharacter);
        text.requestFocus();
        final OptionDialog dialog = new OptionDialog(QUESTION, p, CHOICES_OK_CANCEL, null);
        text.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                dialog.choice(CHOICE_OK);
            }
View Full Code Here


        gbc.weightx = 0.0;
        UIUtil.gridBagAdd(p, new Label(Messages.getString("AuthenticationDialog.username")), gbc, GridBagConstraints.RELATIVE); //$NON-NLS-1$
        final TextField username = new TextField("", 15); //$NON-NLS-1$
        gbc.weightx = 1.0;
        UIUtil.gridBagAdd(p, username, gbc, GridBagConstraints.REMAINDER);
        username.requestFocus();

        // Password
        gbc.weightx = 0.0;
        UIUtil.gridBagAdd(p, new Label(Messages.getString("AuthenticationDialog.password")), gbc, GridBagConstraints.RELATIVE); //$NON-NLS-1$
        final TextField password = new TextField("", 15); //$NON-NLS-1$
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.