|
These code examples and other materials are subject to Sun Microsystems, Inc. Legal Terms Drawing Basic Shapes There are two ways to draw basic shapes like lines and rectangles. The first is to use specific drawing methods like Graphics.drawOval(). This example uses these methods. The second is to construct a shape and then use Graphics2D.draw() to draw the shape. See the java.awt.geom package for examples that create shapes.
Examplets provided by permission of the publisher, Addision-Wesley, and
Author Patrick Chan. | ||||
|
| ||||||||||||