Howdy Bill,
For the past few classes, I've been going over GUI interface programming
with my students. I started them off with the slider example
(PolySpiral), but then retreated back to the "GUIDisplay" example as a
better starting point. GUIDisplay uses a named inner class for the
button handling while the PolySpiral uses an anonymous class to handle
the events.
My students started adding their own buttons and then invoking some of
the drawing code from other Jurtle examples in the handler methods. In
every case, the display area did not update until the execution of the
handler completed even though some of the code explicitly asked for
updates to occur as certain intervals. I'm suspicious that there's some
event and/or thread management issue that is not allowing any of the
interim updates, or perhaps the updateDisplay() method is not updating
the drawing container for some other reason.
In the attached file, I took the GUIDisplay example and then inserted
the ColorWheel example's drawing code into the handler for the Blue
Button and as my students experienced, only one display update occurred
at the very end.
What am I not seeing or understanding?
Thanks,
John