Java Reference
In-Depth Information
a) Painter app running on Windows
Close button
Select a color
Select a shape
Specify
whether a
rectangle or
oval is filled
with color
Clear the
entire drawing
Undo the last
shape that was
added to the
drawing
b) Painter app running on Linux.
Close
button
c) Painter app running on OS X.
Close
button
Fig. 1.11 | Painter app executing in Windows 7, Linux and OS X.
[ Note: Java commands are case sensitive —that is, uppercase letters are different
from lowercase letters. It's important to type the name of this application as
Painter with a capital P . Otherwise, the application will not execute. Specifying
the .class extension when using the java command results in an error. Also, if
you receive the error message, “ Exception in thread "main" java.lang.No-
ClassDefFoundError: Painter ," your system has a CLASSPATH problem. Please
refer to the Before You Begin section for instructions to help you fix this problem.]
4. Drawing a filled yellow oval for the face . Select Yellow as the drawing color, Oval
as the shape and check the Filled checkbox, then drag the mouse to draw a large
oval (Fig. 1.12).
 
Search WWH ::




Custom Search