Previous Section  < Day Day Up >  Next Section

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

A1:

b. The primary color of the Jacksonville Jaguars, teal, has gone unrepresented in Color.

A2:

b. The call to repaint() causes the paintComponent() method to be called manually.

A3:

a. If c. were the right answer, you could use colors that would only be visible years later during flashbacks.

    Previous Section  < Day Day Up >  Next Section