How to remove the Border of jSlider

前端 未结 3 789
既然无缘
既然无缘 2020-12-21 22:24

I`ve customized an jSlider facing a little problem-

After changing values, on my custom jSlider is a border shown. Sorry, I´ve made pictures but Iàm not allowed to p

3条回答
  •  渐次进展
    2020-12-21 23:02

    The focus rectangle is renderered by the slider's UI delegate, typically based on BasicSliderUI. Although I can't advocate defeating the focus indicator, you can try one of the following:

    • Use the UIManager to set the "Slider.focus" color to match the "Slider.background".

    • Override the paintFocus() method to do nothing; a related example is seen here.

提交回复
热议问题