@Nonnull
    @Override
    public Node create(@Nonnull ConfigContainer container, @Nonnull ConfigValue<Integer> value) {
        Observable<Integer> observable = value.getObservable();
        TextField textField = new TextField();
        textField.setText(Integer.toString(observable.getValue()));
        textField.textProperty().addListener((observableValue, oldValue, newValue) -> {
            try {
                int newValueAsInt = Integer.parseInt(newValue);
                observable.setValue(newValueAsInt);
                textField.setEffect(null);
            } catch (NumberFormatException e) {
                textField.setEffect(Effects.ERROR_BORDER);
            }
        });
        textField.focusedProperty().addListener((ob, old, isFocused) -> {
            if (!isFocused && textField.getEffect() != null) {
                textField.setText(Integer.toString(observable.getValue()));
                textField.setEffect(null);
            }
        });

        return textField;
    }
Factory for general {@code int} values.

@author pvpb0t
recaf-ui/src/main/java/software/coley/recaf/services/config/factories/IntegerComponentFactory.java