How to change the Thumb of the JScrollbar to a custom image
问题 Say I have an appropriately sized image inside an Image() I want to change the Thumb or Knob of the JScrollBar component to be this image. I know I need to subclass the ScrollBarUI Here is where I am at right now. public class aScrollBar extends JScrollBar { public aScrollBar(Image img) { super(); this.setUI(new ScrollBarCustomUI(img)); } public class ScrollBarCustomUI extends BasicScrollBarUI { private final Image image; public ScrollBarCustomUI(Image img) { this.image = img; } @Override