I would not have throught this would be such a big problem, but im trying to get the value from a jSpinner called spinHours that is using the default SpinnerNumberModel.
spinHours.getValue().toString();
The above always returns 0. I need is as a string for later, but i've also tried:
SpinnerNumberModel model = (SpinnerNumberModel)spinHours.getModel();
int value = model.getNumber().intValue();
Where the value integer is 0 too.
Am i missing something really obvious?
When my jFrame loads i use the following line in the constructor to set the model for the jSpinner:
spinHours.setModel(new SpinnerNumberModel(0,0,99,1));