Skip to main content

WHAT IS DOUBLE BUFFERING IN JAVA


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 can some-
times be redrawn for each letter! This causes the flicker and can
actually slow things down if you are drawing many items.
Double buffering improves performance because the graphics
can be drawn into memory faster than they can be drawn onto
the screen. Even with the extra step of blasting the graphics to
the screen, double buffering is still much faster.
The double buffering technique we used in our TickerTape applet
is very general, and you can apply it to many of the applets that
you write that need to perform flicker free animation. We sug-
gest you experiment with these concepts—you may come up
some of your own for writing optimized applets.

Comments

Popular posts from this blog

FREE DOWNLOAD "Easy YouTube Video Downloader 5.6"

Easy YouTube Video Downloader 5.6 Add-on to quickly and easily download videos from YouTube to your computer. Adds button to download YouTube videos in FLV, MP3, AAC, MP4 and 720p HD and 1080p. 3GP format coming soon. Full-HD qualities.

HOW TO EXTRACT/DECODE Tiny URL

This is done with the help of a web site UnTiny.me .   This is a service to get the original URL of tiny one. It's a  useful one to know the actual URL of tiny URL, without enter the site. It also help to prevent some kind of malware in the world of INTERNET

DANCING GOOGLE

would u ever seen a dancing google web page. A free falling of google.com That's gravity web page, pls do the following steps open www.google.com