Fixed finish screen switch

tags: #fix
This commit is contained in:
Calum
2017-08-15 23:30:27 +12:00
parent 50baf6f85b
commit 4e68cf31cf
2 changed files with 6 additions and 3 deletions
@@ -159,8 +159,11 @@ public class GameClient {
FXMLLoader fxmlLoader = new FXMLLoader(
getClass().getResource("/views/FinishScreenView.fxml"));
try {
holderPane.getChildren().clear();
holderPane.getChildren().add(fxmlLoader.load());
final Node finishScreenFX = fxmlLoader.load();
Platform.runLater(() -> {
holderPane.getChildren().clear();
holderPane.getChildren().add(finishScreenFX);
});
} catch (IOException e) {
e.printStackTrace();
}