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
You can try using border:0px; property for particular class where border is shown.
Trashgod's answer works nicely. For noob's like me the syntax is;
UIManager.put("Slider.focus", UIManager.get("Slider.background"));
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.