I need to reset a JSpinner to its min value. I've tried get it from model:
spinner.setValue(((SpinnerNumberModel) spinner.getModel()).getMinimum());
But i've got IllegalArgumentException...
That can happen if your model doesn't have a minimum, or if its minimum is a Comparable
that is not a Number
.