You already saw how to use the
Line2D classes in Volume I, Chapter 7. In this section, you will learn how to work with the remaining 2D shapes.
RoundRectangle2D shape, specify the top left corner, width, height, and the x and y dimensions of the corner area that should be rounded (see Figure 7.4). For example, the call
RoundRectangle2D r = new RoundRectangle2D.Double(150, 200, 100, 50, 20, 20);
produces a rounded rectangle with circles of radius 20 at each of the corners.
To construct an arc, specify the bounding box, the start angle, ...