Double buffering is an extremely powerful concept that has helped make some of today’s flicker-free animation and game play possible. It reduces flicker by performing all the graphics functions on a hidden image that resides in memory instead of drawing directly to the screen. Then, the entire image is dis- played all at once instead of having to update the screen every time a new bit of graphics is drawn. If we removed the double buffering technique from our applet, you would see the screen flicker every time the text moved even a little bit. (As an experiment, you might want to try changing the applet code so that the double buffering gets disabled.) If we were drawing any extra graphics or additional text, you would also see flickers for each of those events. These flashes and flick- ers occur because the screen is updated multiple times during the drawing of the object and the Applet class’ paint() method clears the screen before it redraws it. With text, the screen...
Tech news,Mobile phone tricks,Computer tricks,Free downloads...