Summary

Animation remains one of the more entertaining things you can undertake with Java though it no longer is one of the main selling features. Animation can be used to convey information, attract attention, and play games.

Today, you learned how to create components that feature animation by writing paint methods that are able to change each time they are called.

Because animation can be a processor-hogging resource, you learned how to put it in a thread that executes separately from the rest of a program.

Java 2 takes care of many animation tasks automatically that required special programming in past versions of the language. One of these is buffering, the technique that enables several things to be drawn in a component without flickering ...

Get Sams Teach Yourself Java 2 in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.