You have to check the ID and password for case and alphanumeric:

A useful Java method isLetterOrDigit
Character (Java Platform SE 7 )

Some people prefer regex, which searches for a particular...