0

I'm getting crazy trying to make a bigger JScrollBar. I would like to do a larger knot and track... and the JScrollBar itself.

I've found some code here to extend my own BasicScrollBarUI to change the colors, performance, image of the knot... but nothing to make the whole thing bigger. I've tried to modify this code several times to achieve this, but I'm not able to do it.

I mean this post: Custom JScrollbar Problem (change the knob/thumb)

I can create a big knot, but it's "outside" of the screen because the whole thing doesn't get bigger. I think even I'm increasing the track size, but anyway the JScrollBar itself is not growing.

Any ideas?

Thank you in advance.

Community
  • 1
  • 1
rolgalan
  • 1,541
  • 13
  • 31

1 Answers1

1

Try updating ScrollBar width property in UIManager:

UIManager.put("ScrollBar.width", new Integer(50));

Or may be changing preferred size helps:

scrollBar.setPreferredSize(new Dimension(width, height));
Harry Joy
  • 55,133
  • 29
  • 149
  • 204
  • I tried before with the UIManager but I coulnd't get anything. I'm pretty sure I had tried before with setMinimumSize() and setMaximumSize() without success, but now it's done with setPreferedSize(). I can't believe why I didn't check that one. Thanks so much Harry!! – rolgalan Jul 11 '12 at 10:22