Skip to content

Instantly share code, notes, and snippets.

@j-ns
j-ns / README.md
Last active Aug 15, 2020
TextFieldValidator
View README.md

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.