Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

limit login attempts

 
dan sidebottom
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi how do i change this code to limit user attempts to 3?

public void validateUser(String name, String password) {
if (name.equals("admin") && password.equals("letmein")) {
display.setCurrent(list1);
} else {
tryAgain();
}
}
public void tryAgain() {
Alert error = new Alert("Login Incorrect", "Please try again", null, AlertType.ERROR);

Many thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Dan.

Question #1: Is this supposed to have anything at all to do with Java Mobile Edition?

Question #2: What sort of system is this code supposed to be part of? Is it web-based? An applet? Servlet? Stand-alone application?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic