Java JSpinner getFloat(JSpinner spinner)

Here you can find the source of getFloat(JSpinner spinner)

Description

get Float

License

Open Source License

Declaration

public static float getFloat(JSpinner spinner) 

Method Source Code

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

import javax.swing.JSpinner;

public class Main {
    public static float getFloat(JSpinner spinner) {
        float rv = 0;
        Object o = spinner.getValue();
        if (o != null) {
            if (o instanceof Number) {
                rv = ((Number) o).floatValue();
            }//  w ww .j a  v  a2s.  c om
        }
        return rv;
    }
}

Related

  1. dereferenceSpinnerNumberModel(SpinnerNumberModel model)
  2. detachChangeListeners(JSpinner spinner)
  3. fixIntegerList(final JSpinner spinner)
  4. formatSpinner(JSpinner spinner, String format)
  5. generateSpinnerFor(Object... objs)
  6. getInt(JSpinner spinner)
  7. getInt(SpinnerNumberModel model)
  8. getOnlySpinner(Container owner)
  9. getSpinnerFloatValue(JSpinner sp)