Code example for JSlider

Methods: getValue

0
            this.label = label;
        } 
 
        @Override 
        public void stateChanged(ChangeEvent e) {
            int value = slider.getValue();
            label.setText(getMessage(value));
        } 
    } 
 
    /** 
     * Returns a message for the slider based on the given value of the slider. 
     * The value can be expected to be within the range of minSlider to 
     * maxSlider that was initially passed to the LimeSlider implementor. 
     */ 
    public abstract String getMessage(int value);
}