public void setValue(Object value){
        int currentValue = (Integer) getValue();
        
        int v = (Integer) value;
        int result = v;
        if(v > getMaximum()){
            result = getMaximum();
        }
        else if(v < getMinimum()){
            result = getMinimum();
        }
        
        if(result != currentValue){
            super.setValue(result);
            checkUpDownButtonsEnabled();
        }
            JTextField textField = ((JSpinner.DefaultEditor)getEditor()).getTextField();
            textField.setText(String.valueOf(getValue()));
        
        
    }