I have a JSpinner
with maximum number of fraction digits as 6. So when I enter 1.1234567
it is getting rounded off to 1.123457
.
But my requirement is when the user enters the value as a free text I want to disable the rounding and set the value to spinner as such (1.1234567
). However if the user clicks on the spinner arrow button, it can be rounded.
I think that what you can do is to create your own JSpinner Model, something similar to: