Exercises

12.4Fill in the blanks in each of the following statements:
  1. Class_________of the Java 2D API is used to draw ovals.

  2. Methods draw and fill of class Graphics2D require an object of type_________as their argument.

  3. The three constants that specify font style are_________,_________and_________.

  4. Graphics2D method_________sets the painting color for Java 2D shapes.

12.5State whether each of the following is true or false. If false, explain why.
  1. Graphics method drawPolygon automatically connects the endpoints of the polygon.

  2. Graphics method drawLine draws a line between two points.

  3. Graphics method fillArc uses degrees to specify the angle.

  4. In the Java coordinate system, values on the y-axis increase from left to right.

  5. Graphics inherits directly ...

Get Java™ How to Program, Seventh Edition now with O’Reilly online learning.

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