I want to take null values when my JSpinner
is empty. But it returns 0.0
when I call getValue()
function.
public JFormattedTextField getTextField(JSpinner spinner) {
JComponent editor = spinner.getEditor();
if (editor instanceof JSpinner.DefaultEditor) {
return ((JSpinner.DefaultEditor)editor).getTextField();
} else {
return null;
}
}
And this is my method call:
Object a = getTextField(jValueNum).getValue();
Edit: or is there any way to OverLoad the getValue() function?