Double Buffering
Article Metadata
When drawing animated images directly on the screen, many times an undesirable effect named flickering is perceived.
A common technique to avoid this is to draw images on an off-screen buffer, and them copy its contents to the screen when the drawing operations are finished. To implement this technique two buffers are required, hence the term "double buffering". This off-screen buffer has the same dimensions of the screen.
During the time of MIDP 1.0 phones, there was no Java support for this technique, so the developer had to implement it.
However, for MIDP 2.0 phones, the GameCanvas API supports double-buffering automatically. Here you can find a sample of this technique.


Normally Developers use animation while switching from one screen to another secreen.When we animate something sometimes screen flicker for some time and we can not see the animation effect. For that reason we have to user off-screen buffer,it will be called when drawing operation will be completed.
Solution to common problem of screen flickering with link to code example is given. After reading this article developers wont' be having any problem of screen flicking any more. Example source is good resource after reading.
--kalki 11:06, 19 September 2009 (UTC)