Here you can find the source of getFloat(JSpinner spinner)
public static float getFloat(JSpinner spinner)
//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; } }