Thursday, November 1, 2007

Java: Hotline Update #4

Yet again more changes to the Hotline program. It is only a single change this time and was done in a previous update so the groundwork has already been laid. Specifically a new button needs to be added. I actually tried to argue against adding this button as once again this will leave blank spots that isn't too pretty. But since no one else seems to be worrying about this I guess I can't either.


In order to add the button a few changes were required. First the OptionPanel required a new JButton to be added, along with its associated listener, and then the GridLayout adjusted to be 6x4 instead of the previous 5x4. What I didn't realize is that by doing so the main frame would need to be extended as well. So originally the button labels were shortened due to not having enough horizontal space to fully display.

The other main change required was to alter the ReportPanel's main If/Else statement to incorporate the new button option. The previous change from the last update now needed a qualifier at the end of its If/Else section:

else if (Integer.parseInt(targetMonth) <> 9 && Integer.parseInt(targetYear) == 2007)

Then the current update could be tacked onto the end of the statement with no qualifier and would only come into play starting November 1st, 2007, which is when it will be introduced to the Call Center.

The only hitch came when call center representatives attempted to open the program after the update. Some received a message stating they could not find the main class. This was resolved by updating the version of Java on their computers to the latest copy.

No comments: