How can I tell to which value the user has set a JSlider?
- Now we have a plan:
- Add a change event listener to each slider
- When slider is changed, stateChanged method is called
- Find out the new value of the slider
- Recompute color value
- Repaint color panel
- Need to get the current value of the slider
- Look at all the methods that start with get; you find:
public int getValue()
Returns the slider's value.