Skip to content

Instantly share code, notes, and snippets.

@j-ns
j-ns / README.md
Last active August 15, 2020 08:04
TextFieldValidator

TextFieldValidator

A simple class for some basic TextField validations, which uses TextFormatter introduced in JavaFX 8u40

Usage

textField.setTextFormatter(new TextFieldValidator(ValidationModus.MAX_INTEGERS, 4).getFormatter());

or instantiate it in a fxml file, and apply it to a CustomTextField with the according properties.