Here’s my humble solution to the TimeBox quiz posted over at GroovyQuiz.


A couple of things I think are noteworthy
- Populating a comboBox with a range is slick. comboBox(items:1..12) results in Integers with values 1 – 12 inserted into the combo box model. Getting the selected value is even slicker: cb.selectedItem.
- SwingBuilder doesn’t make it any easier to work with layout managers, at least as far as I could see. Not that I expected it to but it would have been nice.
- Lesson learned: ‘5′ as Integer is NOT the same as ‘5′.toInteger().
- Because I used SwingWorker, Java 6 is required.
download and rename to Timebox.jar
[Update: Rather than repost code as I make changes, I'll provide a link to download the code and include a current screen shot so you can determine if you've got the most recent version]