Submitting a background job and updating stage with result
javafx-2
Solution
After calculating the results, running the
Platform.runLater(new Runnable() {
@Override
public void run() {
// Update the text node with calculated results
}
});
at the end of the same background thread is enough in normal situations. This link also maybe helpful: Execute task in background in JavaFX.
Problem
I'm a complete noob with JavaFX 2 - (started this morning with a HelloWorld that I'm adapting). I need to update a Text node with the result of a background thread. Is there anything special I need to be aware of with JavaFX2 or is it simply enough to submit a callable and update the text. A pointer to a tutorial would be appreciated.