Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / September 2006

Tip: Looking for answers? Try searching our database.

FillFect failure?

Thread view: 
Izak van Langevelde - 05 Sep 2006 00:58 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,
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...



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.