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

Double Buffering and Animation

From draggable lightweights, it's not too far a leap to a sprite class that can animate itself, as shown in Figure 24-1.

Figure 24-1. Sprites Animated on a Playfield

Sprites animate through a sequence of images; their movement, speed, and rate of animation are all settable. In the Sprite Animation chapter, you'll find a discussion of the Sprite class, a playfield on which that sprites are animated, animate on, in addition to collision detectors capable of detecting collisions between sprites and between sprites and the boundaries of their playfield.

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