H
Herbert Eberhart
Hi!
I want to set the value of a JSpinner with SpinnerNumberModel for
double-Values.
How can i set the Value of a JSpinner with SpinnerNumberModel
(double)?
With the int-SpinnerNumberModel it works, but I get an invalid
value-Exception when i try to set the value of the JSpinner with
double-SpinnerNumberModel:
SpinnerNumberModel m_d = new SpinnerNumberModel(-4.0, -100.0, 100.0,
1.0);
JSpinner sp = new JSpinner(m_d);
double d;
String s = "" + d;
sp.setValue(s);
Thanks in advance
Herbert
I want to set the value of a JSpinner with SpinnerNumberModel for
double-Values.
How can i set the Value of a JSpinner with SpinnerNumberModel
(double)?
With the int-SpinnerNumberModel it works, but I get an invalid
value-Exception when i try to set the value of the JSpinner with
double-SpinnerNumberModel:
SpinnerNumberModel m_d = new SpinnerNumberModel(-4.0, -100.0, 100.0,
1.0);
JSpinner sp = new JSpinner(m_d);
double d;
String s = "" + d;
sp.setValue(s);
Thanks in advance
Herbert