private JFormattedTextField getTextField( JSpinner spinner )
    {
        JComponent editor = spinner.getEditor();

        if ( editor instanceof JSpinner.DefaultEditor )
        {
            return ( ( JSpinner.DefaultEditor )editor ).getTextField();
        }
        else
        {
            System.err.println( "Unexpected editor type: "
                    + spinner.getEditor().getClass()
                    + " isn't a descendant of DefaultEditor" );
            return null;
        }
    }