How do you get the selected value from a number based spinner in java?
As i side note why does android always come up under the search term spinner
A JSpinner has a SpinnerModel, that stores the selected Value, Bounds of the Values and step sizes, etc.
JSpinner spinner;
Object value = spinner.getModel().getValue();
Also other Spinners work this way. It is based on the Model-View-Controller(MVC)-Pattern and seperates the Data from their presentation and manipulation.
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