O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

Double buffering is an essential technique for dragging lightweight components and for implementing flicker-free animations. Double buffering is implemented by drawing the next frame in an animation into an offscreen buffer; once the offscreen buffer represents the next frame in the animation, it is copied to the screen. This chapter has presented a handful of reusable classes that you can use for implementing double buffering.

In the next chapter, we will build on the DoubleBufferedContainer class presented in this chapter by implementing a Playfield class that can contain animated sprites.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required