Exercises
13.4 Fill in the blanks in each of the following statements:
a) Class _________ of the Java 2D API is used to draw ovals.
b) Methods draw and fill of class Graphics2D require an object of type _________ as their argument.
c) The three constants that specify font style are __________, __________ and __________.
d) Graphics2D method _________ sets the painting color for Java 2D shapes.
13.5 State whether each of the following is true or false. If false, explain why.
a) Graphics method drawPolygon automatically connects the endpoints of the polygon.
b) Graphics method drawLine draws a line between two points.
c) Graphics method fillArc uses degrees to specify the angle.
d) In the Java coordinate system, values on the y-axis increase from ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access