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 ...

Get Java™ How To Program (Early Objects), Tenth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.