/** Set this panel's text field to hidden echo */ public void setNoEcho() { if (fld != null) fld.setEchoChar('*'); }
user.addActionListener(this); passwd = new TextField(10); passwd.setEchoChar('*'); passwd.addActionListener(this);
setLayout(mgbl); passwd = new TextField(10); passwd.setEchoChar('*'); passwd.addActionListener(this); verify = new TextField(10); verify.setEchoChar('*'); verify.addActionListener(this);
passwd = new TextField("", 20); vpasswd = new TextField("", 20); passwd.setEchoChar('*'); vpasswd.setEchoChar('*');
user.addActionListener(this); passwd = new TextField(10); passwd.setEchoChar('*'); passwd.addActionListener(this);
tf.setEchoChar(echoChar); echoChar = 0; tf.addActionListener(this);
tf.setEchoChar(echoChar); echoChar = 0; tf.addActionListener(this);
Vector v = gd.getStringFields(); java.awt.TextField tf = (java.awt.TextField)v.get(v.size() -1); tf.setEchoChar('*'); gd.showDialog(); if (gd.wasCanceled()) {
c.anchor = GridBagConstraints.NORTHWEST; password_text = new TextField("", 15); password_text.setEchoChar('*'); password_text.setEnabled(false);
@Override protected GenericDialog constructDialog() { GenericDialog gd = null; if (options.isHTTP()) { gd = new GenericDialog("Bio-Formats URL"); gd.addStringField("URL: ", "http://", 30); } else if (options.isOMERO()) { gd = new GenericDialog("OMERO Server Credentials"); gd.addStringField("Server: ", "", 80); gd.addStringField("Port: ", "4064", 80); gd.addStringField("Username: ", "", 80); gd.addStringField("Password: ", "", 80); gd.addStringField("Group: ", "default", 80); gd.addStringField("Image ID: ", "", 80); Vector v = gd.getStringFields(); ((TextField) v.get(3)).setEchoChar('*'); } return gd; }
/** Set things up nicely. */ public TiledImageComponent() { setLayout(new FlowLayout()); add(new Label("Name:", Label.CENTER)); add(nameTF=new TextField(10)); add(new Label("Password:", Label.CENTER)); add(passTF=new TextField(10)); passTF.setEchoChar('*'); add(new Label("Domain:", Label.CENTER)); add(domainTF=new TextField(10)); im = getToolkit().getImage(DEFAULT_IMAGE_NAME); }
passwordTextField_.setEchoChar('*'); passwordTextField_.addFocusListener(listener_); passwordTextField_.addKeyListener(listener_);
@Override protected GenericDialog constructDialog() { GenericDialog gd = null; if (options.isHTTP()) { gd = new GenericDialog("Bio-Formats URL"); gd.addStringField("URL: ", "http://", 30); } else if (options.isOMERO()) { gd = new GenericDialog("OMERO Server Credentials"); gd.addStringField("Server: ", "", 80); gd.addStringField("Port: ", "4064", 80); gd.addStringField("Username: ", "", 80); gd.addStringField("Password: ", "", 80); gd.addStringField("Group: ", "default", 80); gd.addStringField("Image ID: ", "", 80); Vector v = gd.getStringFields(); ((TextField) v.get(3)).setEchoChar('*'); } return gd; }
oldTextField_.setEchoChar('*'); oldTextField_.addFocusListener(listener_); oldTextField_.addKeyListener(listener_); newTextField_.setEchoChar('*'); newTextField_.addFocusListener(listener_); newTextField_.addKeyListener(listener_); confirmTextField_.setEchoChar('*'); confirmTextField_.addFocusListener(listener_); confirmTextField_.addKeyListener(listener_);
public LoginDialog() { super("Naked Objects Login"); AWTUtilities.addWindowIcon(this, "login-logo.png"); setLayout(new GridLayout(3, 2, 10, 10)); setResizable(false); add(new Label("User name:", Label.LEFT)); add(user = new TextField()); user.addKeyListener(this); add(new Label("Password:", Label.LEFT)); add(password = new TextField()); password.addKeyListener(this); password.setEchoChar('*'); add(cancel = new Button(CANCEL_LABEL)); cancel.addActionListener(this); cancel.addKeyListener(this); add(login = new Button(LOGIN_LABEL)); login.addActionListener(this); login.addKeyListener(this); pack(); int width = getSize().width; // getWidth(); int height = getSize().height; // getHeight(); Dimension screen = getToolkit().getScreenSize(); int x = (screen.width / 2) - (width / 2); if ((screen.width / screen.height) >= 2) { x = (screen.width / 4) - (width / 2); } int y = (screen.height / 2) - (height / 2); setLocation(x, y); user.requestFocus(); }
public LoginDialog() { super("Naked Objects Login"); AWTUtilities.addWindowIcon(this, "login-logo.png"); setLayout(new GridLayout(3, 2, 10, 10)); setResizable(false); add(new Label("User name:", Label.LEFT)); add(user = new TextField()); user.addKeyListener(this); add(new Label("Password:", Label.LEFT)); add(password = new TextField()); password.addKeyListener(this); password.setEchoChar('*'); add(cancel = new Button(CANCEL_LABEL)); cancel.addActionListener(this); cancel.addKeyListener(this); add(login = new Button(LOGIN_LABEL)); login.addActionListener(this); login.addKeyListener(this); pack(); final int width = getSize().width; // getWidth(); final int height = getSize().height; // getHeight(); final Dimension screen = getToolkit().getScreenSize(); int x = (screen.width / 2) - (width / 2); if ((screen.width / screen.height) >= 2) { x = (screen.width / 4) - (width / 2); } final int y = (screen.height / 2) - (height / 2); setLocation(x, y); user.requestFocus(); }