JSpinner provides us with both a display field and a pair of up and down buttons. Both are kept in sync with the SpinnerModel and are able to change the value.
Now the problem is: if the JSpinner is intended to be used to handle nothing but integers, how to prevent user from inputting characters?
I tried to use spinner.getEditor(), and added KeyEventListener to the editor, but it didn't turn out to be successful.