void disableArrows(JSpinner spinner){ spinner.setUI(new BasicSpinnerUI() { protected Component createNextButton() { return null; } protected Component createPreviousButton() { return null; } }); }
@Override public void updateUI() { super.updateUI(); setUI(new BasicSpinnerUI() { @Override protected LayoutManager createLayout() { return new SpinnerLayout(); } }); }