Please keep in mind that when comparing strings you need to use the "equals" method instead of the "==" or "!=" operators.
This might not be the only problem in your code but the first I saw when...