Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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();
    }
}