@Override
public void stateChanged(ChangeEvent ce)

{
    
    //if for some reason the object which changed state is not a subclass of
    //of Component, do nothing as this code only handles Components
    
    if (!(ce.getSource() instanceof Component)) {
        return;
    }    
    
    //cast the object to a Component so it's methods can be accessed
    Component c = (Component)(ce.getSource());
    
    String name = c.getName();
        
    if (name.startsWith("Cut Depth Input Spinner")){
    
        //Since we know that the Component with the name starting with
        //"Cut Depth Input Spinner" is an MFloatSpinner (because we created it and
        // used that name for it), it can safely be cast to an MFloatSpinner.
        
        //using getText returns the value as a string formatted exactly as that 
        //shown in the spinner's text box and will be rounded off and truncated 
        //in the same manner
        String textValue = ((MFloatSpinner)c).getText();
        
    }
    
    else if (name.startsWith("Cutting Head Position Spinner")){
    
        //Since we know that the Component with the name starting with
        //"Cutting Head Position Spinner" is an MFloatSpinner (because we 
        //created it and used that name for it), it can safely be cast to an 
        //MFloatSpinner.

        //using getText returns the value as a string formatted exactly as that 
        //shown in the spinner's text box and will be rounded off and truncated 
        //in the same manner
        String textValue = ((MFloatSpinner)c).getText();
        
    }
        
}//end of NotcherEventHandler::stateChanged