go to previous page   go to home page   go to next page

Answer:

The add() method, as with any component.


Class JSlider

You must have Java enabled for your browser to see this applet.

The pictures show a variety of sliders. Sliders may be oriented horizontally or vertically. The tick marks and labels are part of the slider. These may be displayed, or not, as an option.

You must have Java enabled for your browser to see this applet.
You must have Java enabled for your browser to see this applet.

Click on and drag the knob to adjust values. As you drag the knob, ChangeEvents are generated. (However, the applets on this page do nothing other than display their sliders.)

Here are the horizontal sliders as images, in case you don't have applets enabled (this page is the only one in this chapter that uses applets).

horizontal slider     horizontal slider

QUESTION 2:

(Take a Guess: ) Sliders generate ChangeEvents. What type of listener responds to ChangeEvents?