Hour 23. Creating Java2D Graphics

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 and frames that hold graphical user interface (GUI) components—into an artistic canvas on which you can draw fonts, colors, shapes, and graphics.

Get Sams Teach Yourself Java™ in 24 Hours, Sixth 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.