I was considering reporting this as a bug or feature but i thought i'd run it by the forum first and get some feedback.
This i the code i have
public class test {
/**
* @param args
*/
public static void main(String[] args) {
SpinnerNumberModel spinner = new SpinnerNumberModel();
spinner.setValue(0);
spinner.setStepSize(0.000001);
System.out.println(spinner.getNumber());
System.out.println(spinner.getNextValue());
}
}
And the ouput is
0
0
Now if i'm not mistaken 0 + 0.000001 = 0.000001 not 0
So if the spinners value is either not previously set, or set to 0. no matter what the step size is it will not increment.
I believe if it is null it should consider that 0 or if 0 is set it should increment.