maybe instead of checking value at every change use 
```java
  SpinnerModel sm = new SpinnerNumberModel(0, 0, 9, 1); //default value,lower bound,upper bound,increment by
  JSpinner spinner = new JSpinner(sm);
```
i think it will be more readable