Calling
Platform.runLater(new Runnable(){
// do your GUI stuff here
});
will fix it.
More Related Contents:
- JavaFX2: Can I pause a background Task / Service?
- How to get stage from controller during initialization?
- Basic JUnit test for JavaFX 8
- JavaFX Application Icon
- TableView: adjust number of visible rows
- How perform task on JavaFX TextField at onfocus and outfocus?
- Copiable Label/TextField/LabeledText in JavaFX
- Internal Frames in JavaFX
- How to use font awesome in a fxml project (javafx)
- How JavaFX application thread works?
- JavaFX – setVisible hides the element but doesn’t rearrange adjacent nodes
- JavaFX: How to change the focus traversal policy?
- Adding borders to GridPane JavaFX
- JavaFX working with threads and GUI
- Line Chart Live update
- How to style menu button and menu items
- Difference between -pthread and -lpthread while compiling
- Does lock xchg have the same behavior as mfence?
- Highlighting Strings in JavaFX TextArea
- JavaFX 2.1 TableView refresh items
- JavaFX How to set scene background image
- What is thread contention?
- Value Change Listener for JavaFX’s TextField
- What is a “thread” (really)?
- Grouping together JavaFX FXML Objects
- Auto fit size column in table view
- What happens when different CPU cores write to the same RAM address without synchronization?
- Can we have race conditions in a single-thread program?
- JavaFx 8: open a link in a browser without reference to Application
- Make portion of a text bold in a JavaFx Label or Text