Guest User

Untitled

a guest
Oct 19th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. import javax.swing.JOptionPane;
  2.  
  3. package log;
  4.  
  5. public class Login {
  6.  
  7. public static void main(String args[]) {
  8.  
  9. String username = JOptionPane.showInputDialog("Enter your username");
  10. String password = JOptionPane.showInputDialog("Enter your password");
  11.  
  12. if (
  13.  
  14. username != null && password != null &&
  15. (
  16.  
  17. (username.equals("gkic17") && password.equals("irena46")) ||
  18. (username.equals("dm") && password.equals("me21mar")) ||
  19. (username.equals("citizenzap") && password.equals("guestboy19"))
  20. )
  21. )
  22. {
  23. JOptionPane.showMessageDialog(null, "Logged in!" );
  24. } else {
  25. JOptionPane.showMessageDialog(null, "Incorrect username or password! Try again later." );
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment