开发者

Changing the width of a knob on a JSlider [duplicate]

This question already has answers here: 开发者_开发技巧 Set the size of a JSlider thumb (2 answers) Closed 9 years ago.

Ok, so I have searched google for a while now to see if I can find the answer to this but no dice. Maybe I am just searching for the wrong thing but this is what I want to know:

How do you change the width of the actual Knob on the JSlider component? NOT how to change the width of the JSlider.

Any help would be greatly appreciated!


   BasicSliderUI sliderUI = new javax.swing.plaf.basic.BasicSliderUI(jTimeSlider){
        protected Dimension getThumbSize() {
              return new Dimension(15, 20);
          }
      };
    jTimeSlider.setUI(sliderUI);

where dimension width is the width of the knob.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜