-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta2
-
generic
-
generic
A SpinnerNumberModel can be used with a JSpinner to limit the value that the spinner can take to a maximum and a minimum. When using the spinner's up or down arrows, the spinner will not go past the min or max. Currently, the up and down arrow keys can be used to increment/decrement the spinner values as well. However, an IllegalArgumentException is thrown when the value tries to exceed the max or min.
Compile and run the attached test code. Put the focus on the text field part of the spinner and press the up key repeatedly. After the spinner value reaches 20, the set maximum, an IllegalArgumentException will be thrown for every time the up key is pressed.
Compile and run the attached test code. Put the focus on the text field part of the spinner and press the up key repeatedly. After the spinner value reaches 20, the set maximum, an IllegalArgumentException will be thrown for every time the up key is pressed.