Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top