I am writing part of my program which read data from a txt file.
I have problem when I want to set value of JSpinner by setValue(object).
My data is double so I need to convert it to object, but how?
LoadData open = new LoadData();
data.setFz(open.giveAwayData());
spinner_1.setValue(data.getFz()); // Fz is double
Try casting it to Double (with capital):
spinner_1.setValue((Double) data.getFz());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With