0

Is there a simple way to edit the width of the JSpinner arrows?

Nikita Volkov
  • 42,792
  • 11
  • 94
  • 169
Meant2Play
  • 57
  • 1
  • 2
  • 6

1 Answers1

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