JavaFX: ConcurrentModificationException while adding TreeItem objects in TreeView, in a seperate thread
问题 I have the following code public void start(Stage primaryStage) { BorderPane border_pane = new BorderPane(); TreeView tree = addTreeView(); //TreeView on the LEFT border_pane.setLeft(tree); /* more stuff added to the border_pane here... */ Scene scene = new Scene(border_pane, 900, 700); scene.setFill(Color.GHOSTWHITE); primaryStage.setTitle("PlugControl v0.1e"); primaryStage.setScene(scene); primaryStage.show(); } public static void main(String[] args) { launch(args); } With addTreeView being