Darryl Burke wrote:
Trish Smith wrote:we can't use features like SwingUtilities
Don't be silly. How else are you going to launch the GUI on the EDT?
Are you allowed to use EventQueue?
No. This is an intro level course and the instructor is very clear about what we can and cannot use. Each assignment is focused on a particular concept and may not necessarily lead to a "real world" programming solution.
To get things finally working, I modified the Vote class (thanks for the feedback received in this forum):
Modified the toString method in the Histogram class (a required element):
Then created the array objects (still using two because I ran out of time to get the single array solution working) in the VoteControls class:
Then modified the listeners:
Now that it works I wish I had time to go back and clean it up. It's not an elegant solution and there are stray bits of code that could be removed, but at least it does work and it was submitted by the deadline, with 30 minutes to spare. ;-)