public void paintIcon(Component c, Graphics g, int x, int y) {
if (!(g instanceof Graphics2D)) {
return;
}
JSlider slider = (JSlider) c;
SliderUI sliderUI = slider.getUI();
ComponentState state = ComponentState.ACTIVE;
if (sliderUI instanceof SubstanceSliderUI) {
state = ComponentState.getState(((SubstanceSliderUI) sliderUI)
.getTransitionModel(), null);
} else {