Is there a simple way to edit the width of the JSpinner arrows?
Asked
Active
Viewed 1,555 times
1 Answers
0
You can use setPreferredSize()
:
Dimension d = spinner.getPreferredSize();
d.width = 50;
spinner.setPreferredSize(d);
Be careful with LayoutManager, which can modify this preferred size if it is out of bounds.

zessx
- 68,042
- 28
- 135
- 158
-
In general, it's [better](http://stackoverflow.com/q/7229226/230513) to rely on the UI delegate's preferred size. – trashgod Jul 26 '12 at 15:27