Sams Teach Yourself Java 2 in 24 Hours

Sams Teach Yourself Java 2 in 24 Hours

By Rogers Cadenhead

Quiz

Test whether your font and color skills are MAH-ve-lous by answering the following questions.

Questions

  1. Which one of the following is not a constant used to select a color?
    1. Color.cyan
    2. Color.teal
    3. Color.magenta
  2. When you change the color of something and redraw it on a container, what must you do to make it visible?
    1. Use the drawColor() method.
    2. Use the repaint() statement.
    3. Do nothing.
  3. What do the initials HSB stand for?
    1. Hue Saturation Brightness
    2. Hue Shadows Balance
    3. Lucy in the Sky with Diamonds

Answers

  1. b.
  2. b. The call to repaint() causes the paintComponent() method to be called manually.
  3. a. If c. were the right answer, you could use colors that would only be visible years later during flashbacks.

Share ThisShare This

Informit Network