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();
}
}
Java的密码框
最新推荐文章于 2022-07-13 14:45:08 发布