Reputation: 331
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...
Upvotes: 0
Views: 3683
Reputation: 11454
That can happen if your model doesn't have a minimum, or if its minimum is a Comparable
that is not a Number
.
Upvotes: 1