• 1. 
    Which of the following is NOT a valid drawing method of the Graphics class?

  • drawRect
  • drawCircle
  • fillOval
  • drawPolygon
  • 2. 
    What font styles do Java fonts support?

  • plain only
  • plain and bold only
  • plain, bold, and italic only
  • plain, bold, italic, and bold+italic
  • 3. 
    When an object of a class derived from JPanel needs to repaint itself, which method does it call?

  • paint(g)
  • repaint( )
  • paintComponent(g)
  • repaintComponent( )
  • 4. 
    What are the default units for coordinates in Graphics?

  • inches
  • pixels
  • centimeters
  • millimeters
  • 5. 
    Which of the following is true about the 'paint' method?

  • can be called directly from your Java program
  • automatically called in response to certain messages
  • not the central drawing method for the application window
  • none of these options are true
  • 6. 
    By default, graphics coordinates in Java have the origin (0,0) in the _______ corner of the drawing area.

  • upper-left
  • upper-right
  • lower-left
  • lower-right
  • 7. 
    With what arguments(s) is the setColor method of the Graphics class called?

  • a Color object
  • three integers (red, green, blue components of a color)
  • a BasicStroke object
  • a Paint object
  • 8. 
    What does the 'c' represent in the following method call:g.fill3DRect(a, b, c, d, e);

  • the x value starting position
  • the y value starting position
  • the width of the rectangle
  • the height of the rectangle
  • 9. 
    Which of the following capabilities is not supported by the Graphics class?

  • drawing filled rectangles
  • shifting the origin in the coordinate frame
  • rotating the coordinate frame
  • different font sizes
  • 10. 
    What does the 'b' represent in the following method call:g.drawOval(a, b, c, d);

  • the x value starting position
  • the y value starting position
  • the width of the rectangle
  • the height of the rectangle
Report Question
warning
access_time
  Time