double buffering : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

double buffering
a technique for being able to refresh the screen faster by using prerasterised off-screen images. Basically you create your images with createImage or fetch them off disk by asking MediaTracker to get them for you via MediaTracker.addImage. You need to make sure the disk images are loaded with MediaTracker.waitFor. Then once all your Image objects are in RAM (Random Access Memory) you can render rapidly in succession with: this.getGraphics().drawImage(thatImage), 0, 0, this); Normally you spin the animation off to a separate thread.

You can’t use animated *.gif files in Java unless you decompose them yourself and use the double buffering technique.

Swing does double buffering for you automatically, though the AWT (Advanced Windowing Toolkit) does not.


This page is posted
on the web at:

http://mindprod.com/jgloss/doublebuffering.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\doublebuffering.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.188.96.17]
You are visitor number