Answer : JavaFX append text to TextArea throws Exception
I have a thread that calculates the size of a directory.
I use walkFileTree for this.
To get
Ran into same error and as kleopatra's comment stated, FX textarea must be accessed on FX thread.
For simple cases, use Platform.runLater with Java 8 Lambda:
javafx.application.Platform.runLater( () -> taStatus.appendText(file.toString() + "\n") );
If you have many log messages, instead of flooding the FX thread it would be better to buffer them and update TextArea less frequently. Here is an example: https://stackoverflow.com/a/31414801/3710098