How do I construct a JSlider?
- Look at the Java version 5.0 API documentation
- There are six constructors for the JSlider class
- Learn about one or two of them
- Strike a balance somewhere between the trivial and the bizarre
- Too limited:
public JSlider()
Creates a horizontal slider with the range 0 to 100 and an initial value of 50
- Bizarre:
public JSlider(BoundedRangeModel brm)
Creates a horizontal slider using the specified BoundedRangeModel
- Useful:
public JSlider(int min, int max, int value)
Creates a horizontal slider using the specified min, max, and value.