Java tutorial
//package com.java2s; import javax.swing.JSpinner; import javax.swing.SpinnerNumberModel; public class Main { public static double getDouble(JSpinner spinner) { return getSpinnerModel(spinner).getNumber().doubleValue(); } public static SpinnerNumberModel getSpinnerModel(JSpinner spinner) { return (SpinnerNumberModel) spinner.getModel(); } }