1.10 Test-Driving a Java Application

In this section, you’ll run and interact with your first Java application. The Painter application, which you’ll build over the course of several exercises, allows you to drag the mouse to “paint.” The elements and functionality you see here are typical of what you’ll learn to program in this book. Using the Painter’s graphical user interface (GUI), you can control the drawing color, the shape to draw (line, rectangle or oval) and whether the shape is filled with the drawing color. You can also undo the last shape you added to the drawing or clear the entire drawing. [Note: We use fonts to distinguish between features. Our convention is to emphasize screen features like titles and menus (e.g., the File menu) ...

Get Java™ How To Program (Early Objects), Tenth 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.