February 2014
Beginner
1248 pages
62h 25m
English
This example demonstrates several Java 2D shapes from package java.awt.geom, including Line2D.Double, Rectangle2D.Double, RoundRectangle2D.Double, Arc2D.Double and Ellipse2D.Double. Note the syntax of each class name. Each class represents a shape with dimensions specified as double values. There’s a separate version of each represented with float values (e.g., Ellipse2D.Float). In each case, Double is a public static nested class of the class specified to the left of the dot (e.g., Ellipse2D). To use the static nested class, we simply qualify its name with the outer-class name.
In Figs. 13.29–13.30, we draw Java 2D shapes and modify their drawing characteristics, such as changing line thickness, ...
Read now
Unlock full access