Exercises
-
27.4 Fill in the blanks in each of the following statements:
Class of the Java 2D API is used to draw ovals.
Methods
draw
andfill
of classGraphics2D
require an object of type as their argument.The three constants that specify font style are , and .
Graphics2D
method sets the painting color for Java 2D shapes.
-
27.5 State whether each of the following is true or false. If false, explain why.
Graphics
methoddrawPolygon
automatically connects the endpoints of the polygon.Graphics
methoddrawLine
draws a line between two points.Graphics
methodfillArc
uses degrees to specify the angle.In the Java coordinate system, values on ...
Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.