Changing handle width on JSlider

Ok, so I searched google for a while to see if I can find an answer to this question, but not a cube. Maybe I was just looking for the wrong thing, but this is what I want to know:

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

Any help would be greatly appreciated!

+2


a source to share


1 answer


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

      



where dimensional width is the width of the handle.

+2


a source







All Articles