Java Utililty Methods JPasswordField

List of utility methods to do JPasswordField

Description

The list of methods to do JPasswordField are organized into topic(s).

Method

JPasswordFieldmakeJPasswordField(Document d, String s, int len, Object listener)
Factory Method to create Password Filed using specified params
JPasswordField pf = new JPasswordField(DEFAULT_TEXTFIELD_WIDTH) {
    public void setEnabled(boolean enabled) {
        super.setEnabled(enabled);
        super.setEditable(enabled);
        setBackground(enabled ? Color.white : SystemColor.window);
        this.repaint();
};
...
voidshowPassword(JPasswordField pf, JCheckBox cb)
show Password
if (cb.isSelected()) {
    pf.setEchoChar('\u0000');
} else {
    pf.setEchoChar('*');