What is double buffering?

Finlay McWalter

Double-buffering is a technique to reduce flickering in drawing, particularly in animation.

Instead of drawing directly onto the component (in the paint or update method) you create an offscreen image (using component.createImage) and paint your picture into that. Once you're done you actualise the image by painting it onto the graphics context of an actual component - thus there isn't a time when your image can be seen half-drawn.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact