I try to run in JavaFX application background thread periodically, which modifies some GUI property.
I think I know how to use Task and Service
Task
Service
I would Prefer the PauseTransition:
PauseTransition wait = new PauseTransition(Duration.seconds(5)); wait.setOnFinished((e) -> { /*YOUR METHOD*/ wait.playFromStart(); }); wait.play();