0

How to take the value in JSpinner on java swing?

if we use text field, we can use getstring() for take the value that user inputed,, but how to take the value if i use spinner?

5th Nov 2019, 2:13 PM
yasifa ana
1 Answer
+ 1
To get currently selected value, use: JSpinner spin =...... var_smthng = spin.getValue(); Further you can use getPreviousValue(); and getNextValue(); to get prev and next values to selected one.
14th Nov 2019, 1:38 PM
Anirudh Sharma
Anirudh Sharma - avatar