[java] Double buffering in applets

Started by
10 comments, last by DiscoStoo 23 years, 2 months ago
If memory serves me correctly, when a component is painted, paint() is sometimes called, but update() is always called. And the default implementation of update() clears the component - which causes the flickering.

Therefore it''s slightly more efficient for paint to call update and for update to do the painting.
Advertisement
Ignore that last post. I was talking bollocks.

update() is not always called. paint() is usually called when part of a component is uncovered (update is not called in this case apparently)

I still think update is called more often than paint - I seem to recall reading that somewhere - so the efficiency argument is still true.

This topic is closed to new replies.

Advertisement