task_arrow_error = new Task<Void>() {
@Override protected Void call() throws Exception {
try {
Platform.runLater(() -> {
if (node instanceof TextField) {
TextField text = (TextField) node;
text.setStyle("-fx-background-color: linear-gradient(#FF4000, #DF0101);");
}
});
Thread.currentThread().sleep(3000);
Platform.runLater(() -> {
if (node instanceof TextField) {
TextField text = (TextField) node;
text.setStyle("");
}
});
} catch (Exception ex) {
Logger.getLogger(EffectFX.class.getName()).log(Level.SEVERE, null, ex);
}