code: @Override
    public void initializeParts() {
      super.initializeParts();
  
      getStyleClass().addAll("simple-integer-control");
      final SpinnerValueFactory.IntegerSpinnerValueFactory factory =
          new SpinnerValueFactory.IntegerSpinnerValueFactory(
              Integer.MIN_VALUE, Integer.MAX_VALUE, field.getValue()
          );
  
      // override old converter (IntegerStringConverter) because it throws
      // NumberFormatException if value can not be parsed to Integer
      factory.setConverter(new NoExceptionStringConverter());
      editableSpinner.setValueFactory(factory);
      editableSpinner.focusedProperty().addListener((observable, wasFocused, isFocused) -> {
        if (wasFocused && !isFocused) {
          overrideNonIntegerSpinnerValues();
        }
      });
      editableSpinner.addEventHandler(KeyEvent.ANY, event -> {
        if (event.getCode() == KeyCode.ENTER) {
          overrideNonIntegerSpinnerValues();
        }
      });
    }
docs: {@inheritDoc}