Code example for JSlider

Methods: getClientPropertyputClientPropertygetUIsetModel

0
     * If the JSlider is already configured for another model, 
     * it is unconfigured first. 
     */ 
    @Override 
    public void configureSlider(int componentIndex, JSlider slider) {
        if (slider.getClientProperty("colorSliderModel") != null) {
            ((DefaultColorSliderModel) slider.getClientProperty("colorSliderModel")).unconfigureSlider(slider);
        } 
        if (!(slider.getUI() instanceof PaletteColorSliderUI)) {
            slider.setUI((PaletteColorSliderUI) PaletteColorSliderUI.createUI(slider));
        } 
        BoundedRangeModel brm = getBoundedRangeModel(componentIndex);
        slider.setModel(brm);
         
        slider.putClientProperty("colorSliderModel", this);
        slider.putClientProperty("colorComponentIndex", componentIndex);
        addColorSlider(slider);
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java