JSpinner: setValue(Object value) : JSpinner « javax.swing « Java by API






JSpinner: setValue(Object value)

 


import javax.swing.JSpinner;

public class Main {
  public static void main(String[] argv) throws Exception {
    // Create a number spinner
    JSpinner spinner = new JSpinner();

    // Set its value
    spinner.setValue(new Integer(100));
  }
}

   
  








Related examples in the same category

1.new JSpinner.DateEditor(JSpinner spinner, String dateFormatPattern)
2.JSpinner.NumberEditor.NumberEditor(JSpinner spinner)
3.new JSpinner(SpinnerModel model2)
4.new JSpinner(SpinnerModel model1) (SpinnerDateModel)
5.JSpinner: addChangeListener(ChangeListener lis)
6.JSpinner: getModel()
7.JSpinner: setEditor(JComponent editor)