Search code examples
javasliderjslidernimbus

change nimbus thumb slider to arrow shape


How Can I use the default arrow shape of thump slider in nimbus?

I set the nimbus L&F and my thumb shape is a circle like this enter image description here , but I'd like a triangle like this enter image description here. how can I change it or change back to it's default (that is, without nimbus just for slider thumb shape).


Solution

  • I found the answer:

    JSlider slider = new JSlider();
    slider.putClientProperty( "Slider.paintThumbArrowShape", Boolean.TRUE );