我什至不知道从哪里开始

Create a login screen for a program. Your program will authenticate a user and tell them if their login is accepted or not. Your program should be able to accept multiple users from a Text File. There is a JPasswordField you could use for the password. If you wish, you may use a JPasswordField...

JPasswordField txtPassword = new JPasswordField( );

The JPasswordField functions just like a JTextField only hiding the characters. To get the text from the JPasswordField, you code...

String password = txtPassword.getText();
评论