How to hide the knob of jSlider?

后端 未结 3 1190
后悔当初
后悔当初 2021-01-22 17:01

I need to customize the knob of JSlider. I need to put my own knob\'s image over default knob of Jslider. The problem is that currently two knobs are coming in response. One my

3条回答
  •  攒了一身酷
    2021-01-22 17:28

    The UIManager solution only works in the Metal LAF from what I can tell.

    If you want to change the behavour of the UI then you need to change the UI. In this case you would need to the BasicSliderUI (or one of its sub classes). Then I believe you would need to override the paintThumb() method.

提交回复
热议问题