[2716] in java-interest
Repainting delayed
daemon@ATHENA.MIT.EDU (Stephen Harris)
Wed Oct 11 18:46:18 1995
From: sweh@mpn.com (Stephen Harris)
To: java-interest@java.sun.com
Date: Wed, 11 Oct 1995 20:40:59 +0100 (BST)
I'm getting there slowly....
In this game I'm writing, if a certain object is pressed I want to
make a number of other icons flash. Now, I have background gif and
over the top of this I paint 26 other small gifs. If a selector is
true then I paint version A, else I paint version B.
The problem I have is that I want the gifs to flash 10 times (say)
eg
for (i=0;i<10;i++)
{
randomly_select_images;
repaint()
}
This is being done inside the mouseDown() method. Unfortunately the
repaint() isn't being down until after the 10 selections so all I see
is the final one I want, and not the 9 intermediate selections.
Can anyone advise on a better way of doing this? Maybe a seperate
thread that acts when a variable is set in mouseDown ?
Any advice welcome!
rgds
Stephen
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com