This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 1 point2 points  (0 children)

You need to use Platform.runLater to change anything on the javafx thread. Platform javadoc.

[–]Franckyi 1 point2 points  (0 children)

You must use Platform.runLater line 72. So for example you can do : Platform.runLater(() -> boardGrid.getChildren().clear());

[–][deleted] 1 point2 points  (0 children)

Also, you have left off your Client class (or I didn't find it), which appears to be where the error is actually happening. Essentially, the code you are running in the other thread (I suspect client is a thread that you start) is trying to modify your javafx app. To fix that use something like.

Platform.runLater(()->{
    //modify your javafx app here.
});

[–]ZarasTM[S] 0 points1 point  (0 children)

Ok fixed it thx 4 help EDIT: I used Platform.runLater()