Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Boolean login = false;
- while(read.nextLine() !=null){
- String user = read.next();
- String pass = read.next();
- read.next();
- if(usernameT.getText().equals(user) &&
- passwordT.getText().equals(pass)){
- login = true;
- break;
- }
- }
- if(login)
- new Menu();
- else {
- JOptionPane.showMessageDialog(null, "Incorrect
- username or password");
- usernameT.setText("");
- passwordT.setText("");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement