// sets min and value to 0 svoid setSpinnerMax(JSpinner s, int max) { if (s != null) swing { s.setModel(new SpinnerNumberModel(0, 0, max, 1)); } }