October 2009
Beginner
432 pages
8h 14m
English
WHAT YOU’LL LEARN IN THIS HOUR:
Setting the font and color of text
Setting up a container’s background color
Drawing lines, rectangles, and other shapes
Drawing GIF and JPEG graphics
Drawing filled and unfilled shapes
During this hour, you learn how to turn Swing containers—the plain gray panels, applets, and frames that hold graphical user interface (GUI) components—into an artistic canvas on which you can draw fonts, colors, shapes, and graphics.
Font ClassColors and fonts are represented in Java by the Color and Font classes in the java.awt package. With these classes, you can present text in different fonts and sizes and change the color of text and graphics. Fonts are ...
Read now
Unlock full access