Created
March 11, 2020 01:57
-
-
Save Aero-Blue/9e3feeff921afac6d011cce443367058 to your computer and use it in GitHub Desktop.
Update UI with background operation (JavaFX, 8)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thread thread = new Thread(() -> { | |
Runnable updater = () -> { | |
// update ui operation / last here | |
}; | |
// perform background operations here | |
Platform.runLater(updater); | |
}); | |
thread.setDaemon(true); // let application close | |
thread.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment