Circle JSlider - Java program
Can someone show me code that will set u开发者_JS百科p a JSlider except, instead of a thumb, it is a circle? Specifically, instead of that little triangle which points to the current position, it is a blue circle of width 100;
Assuming you're using the Metal L&F you could extend javax.swing.plaf.metal.MetalSliderUI and override the horizThumbIcon
or vertThumbIcon
to be your circle. Then set this UI to be UI you'd like for your sider using slider.setUI()
look at this the answer here which performs a change for a JComboBox How can I change the arrow style in a JComboBox.
精彩评论