When running the project, I'm getting the output for my else statement instead of my if statement even though the username and password I've created are being entered correctly into the GUI.
Any advice on how I can correct this problem would be greatly appreciated.
Please do not use screen snapshots for source code or error text. Cut and paste them into a post instead.
Your problem is with the two small methods at the top. You've declared LOCAL String variables and when the method ends the contents disappear. I assume you meant to save it in an instance variable so that you can retrieve it later.
The problem is, that you cannot compare String and char array by equals method that way as they are incomparable.
2 options you can try to apply to overcome this problem:
1. assemble a String from char array and then compare password string with an assembled string from char array
2. password string convert to a char array and compare against input array with Arrays.equals(...)
Whenever you are sure you are doing things right, that's when you most need to check yourself. don't be afraid to use temporary log messages to validate. you can print to a screen or a log file the values you think you are testing...if you are sure your string is correct - print it. I usually print it between two characters, like a colon or a pipe, to be sure there aren't leading/trailing spaces or carriage returns.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors