public class TestTextDemo03 extends JFrame {
public TestTextDemo03(){
Container container = this.getContentPane();
JPasswordField passwordField = new JPasswordField();//***
passwordField.setEchoChar('*');
container.add(passwordField);
this.setVisible(true);
this.setSize(500,350);
this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}
public static void main(String[] args) {
new TestTextDemo01();
}
}