O'Reilly logo

Sams Teach Yourself Java™ 2 Platform in 21 Days Professional Reference Edition by Rogers Cadenhead, Laura Lemay

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

Chapter 9. Making Programs Look Good with Graphics, Fonts, and Color

One of the best ways to impress a non-programming acquaintance is with a program that features graphics. Uncle Wade might not appreciate the nuances of a well-constructed for loop or an elegant class hierarchy, but show him your animated sequence of a toddler dancing the Funky Chicken, and he'll be impressed with your programming acumen.

Today you start learning how to win friends and influence people by writing applets that use graphics, fonts, and color.

To use graphical features in your programs, you utilize classes of the java.awt package, which delivers most of Java's visual pizzazz. With these classes you'll draw text and shapes like circles and polygons in an applet. You ...

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