Java JSpinner setSpinnerValue(JSpinner spinner, Integer i)

Here you can find the source of setSpinnerValue(JSpinner spinner, Integer i)

Description

set Spinner Value

License

Open Source License

Declaration

public static void setSpinnerValue(JSpinner spinner, Integer i) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.*;

public class Main {
    public static void setSpinnerValue(JSpinner spinner, Integer i) {
        if (i == null) {
            spinner.setValue(-1);/*  w  w  w.  j  ava 2s  .  c  o  m*/
        } else {
            spinner.setValue(i);
        }
    }
}

Related

  1. reattachChangeListeners(JSpinner spinner, ChangeListener[] listeners)
  2. replaceSpinnerValue(JSpinner spinner, double value)
  3. setList(JSpinner spinner, List values)
  4. setRightAlignment(JSpinner spinner)
  5. setSpinnerFloatValue(JSpinner sp, float f)