How do I force a re-draw?
Posted on 1998-09-15
I'm making a 'Game of Life' Java swing component.
I've got it to the stage where the 'step' (one round of the game) command runs fine, but when I try to set up the 'run' command (which just iterates step until the stop button is pressed), the component freezes.
I'm assuming that this is because the redraw 'thread' which is spawned has a very low priority. I basically want to 'force' a redraw.
I've toyed around with putting things in seperate threads, etc, and suspending them, but I haven't had much luck, and it occurs to me that a redraw-forcing option would really be a good idea.
Thanks for the help.