Skip to content

Instantly share code, notes, and snippets.

@alamenai
Created April 23, 2018 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alamenai/4e5a62fcc9de9215cc3f804e2f6dfea0 to your computer and use it in GitHub Desktop.
Save alamenai/4e5a62fcc9de9215cc3f804e2f6dfea0 to your computer and use it in GitHub Desktop.
A piece of code to remove a right/left node from CustomTextField in ControlFX
public static void removeErrorIcon(TextField textField) {
if (textField instanceof CustomTextField) {
CustomTextField customTextField = (CustomTextField) textField;
Platform.runLater(() -> {
((StackPane)customTextField.getRight().getParent()).getChildren().remove(customTextField.getRight());
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment