I have a small animation running, which for each step first empties its
pane through fillRect, and then paints its elements. Works like a charm,
but every now and then, traces of the animated elements show up in the
background, as if the pane was not completely emptied (tried this both
with and without double buffering)
I tried to isolate the problem by creating a small application with a
JPanel, with a paint method which first paints its panel pink, waits one
second, and then black (odd calls) or white (even calls). To my
surprise, the pink never shows up, while the Jpanel alternates between
black and white.
Any clue?

Signature
Grinnikend door het leven...
Knute Johnson - 05 Sep 2006 01:50 GMT
> I have a small animation running, which for each step first empties its
> pane through fillRect, and then paints its elements. Works like a charm,
[quoted text clipped - 9 lines]
>
> Any clue?
Yes. It's in your code somewhere!
knute...
Izak van Langevelde - 06 Sep 2006 00:47 GMT
> > I have a small animation running, which for each step first empties its
> > pane through fillRect, and then paints its elements. Works like a charm,
[quoted text clipped - 11 lines]
>
> Yes. It's in your code somewhere!
Actually, it was the Swing double buffering which caused the problem.
Thanks, you were really helpful...

Signature
Grinnikend door het leven...