double buffering : Java Glossary


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:

Optional Replicator mirror
on local hard disk J:

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.

Your face IP:[]
You are visitor number