Forums Register Login

JSpinner decimal input

+Pie Number of slices to send: Send
Is it possible to configure a JSpinner so that it will allow me to format a field for input of a value with 3 decimal places. I have tried several ways some of which display 0.000 etc but when I exit the field the value to the right if the decimal point reset back to .000

Some posts imply that a spinner can only handle integers. If so what would the best alternative be ?

Thanks in advance

Dave
+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
Wow - thanks for the example - just what I needed.
You've gotta fight it! Don't give in! Read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 18549 times.
Similar Threads
Decimals not converting to correct fractions
KeyEvent
Is it possible for a JSpinner to show no default value?
JSpinner & SpinnerNumberModel
Which Swing component to use ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:27:02.