(a) Find the source code for the class java.awt.graphics to find what
drawing methods are available in addition to drawLine and
drawRect that were used to draw the stick figure. It is important
to know how to locate the JDK source code as it is often the best source of
information about these programs. Once the master java directory is located
on your machine, the source code is normally found in various subdirectories
of the directory java-master-directory/src/java/.
Use some of the
methods in a program to draw other figures, e.g., a stick figure with an
oval body. Also see Late Night Java, pp. 101-103, for more
information on Graphics methods for drawing shapes. The
source code for the stick figure example is available.
(b) Use the information in the section Working with Colors (pp. 100-101)
to draw your
figures in one or more different colors.