This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Ok I am having an issue with a exception when trying to add new shapes to my JavaFx program. I have a randomizer that will randomly create a new Box object, which is converted to a rectangle for JavaFx use by a method I wrote, which all works fine. But when I setup the timer everything will run perfectly fine the first time through but then fails when it gets to this line when the timer kicks in. This is what the entire method looks like.
Here is using a timer to call the generateShapes method every 2 seconds or so.(As you notice I have a while loop that is commented out, which works perfectly fine but I need a timer which is causing the Thread exception.