Day 13. Threads and Animation

When Java was introduced in 1995, hundreds of programmers put it to use creating animated applets. There was no other way at the time to offer animation on a Web page—animated GIF files were not supported in browsers and Shockwave, Flash, and ActiveX were not yet available—so Java was a great way to create dynamic content for visitors to your site.

Though a lot has changed since then, Java remains one of the easiest ways to create animated content (especially for complex effects) on and off the World Wide Web.

Animation in Java is accomplished by using the Abstract Windowing Toolkit, Swing, and the Thread class in the java.lang package.

Today, you learn how the various parts of Java work together to create moving ...

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.