Skip to main content

How to set a value on spinner component

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
Leleo
Offline
Joined: 2011-11-19

I have a spinner type hour. How to set values for this component

E.g: I create the component and set value 16:00. How set the value to 18:00 on execution time

Thx

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07

spinner.setValue(new Integer(timeInSeconds));