Code example for JSlider

Methods: isEnabled

0
		super.uninstallListeners(slider);
	} 
 
	@Override 
	protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) {
		if (this.slider.isEnabled()) {
			g.setColor((Color) UIManager.get("Slider.minorColor"));
		} else { 
			g.setColor((Color) UIManager.get("Slider.minorDisabledColor"));
		} 
		g.drawLine(x, 0, x, tickBounds.height / 2 - 1);
	} 
 
	@Override 
	protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) {
		if (this.slider.isEnabled()) {
			g.setColor((Color) UIManager.get("Slider.majorColor"));
		} else { 
			g.setColor((Color) UIManager.get("Slider.majorDisabledColor"));
		}