Quiz

No pane, no gain: Exercise some brain muscle by answering the following questions about scroll panes, image icons, and other Swing features.

Questions

1:

What graphics file formats are supported by the ImageIcon class?

  1. GIF
  2. GIF and JPEG
  3. GIF, PNG, and JPEG
2:

What does a JSlider object's getValueIsAdjusting() method accomplish?

  1. It determines whether the slider has been changed from its original value.
  2. It determines whether the slider is currently being changed in value.
  3. Not a lot; this method is a major disappointment to its parent superclass.
3:

The Swing library was named after a style of dance band jazz that was popularized in the 1930s and unexpectedly revived in the 1990s. Which of the following is not a real title of a song performed by a Swing musician?

  1. "Cement Mixer (Put-ti, Put-ti)"
  2. "Barney Google with the Goo Goo Googly Eyes"
  3. "Flat Foot Floogie (with the Floy Floy)"

Answers

A1:

b. PNG is supported with other Java classes that involve images, but graphics in this format aren't supported by ImageIcon.

A2:

b. The getValueIsAdjusting() method returns TRue while the slider is being moved and false otherwise.

A3:

b. "Barney Google," a hit song by Billy Rose in 1923, was too early for Swing. The other two songs are Swing hits by Slim Gaillard, whose gift for gibberish also was evident in the songs "Boot-Ta-La-Za," "Ra-Da-Da-Da," " Bingie-Bingie-Scootie," and "Vout Oreenie."

      
Comments