Why does JavaFX table.getItems().clear() clear the ObservableList as well
问题 I've a JavaFX table defined as: TableView<Person> table = new TableView<>; //Person Class contains firstName,lastName & email properties //table has three columns First Name, Last Name & Email An ObservableList of Person s ObservableList<Person> persons = FXCollections.observableArrayList(); A background service, which task is to populate the table dynamically by adding entries( Person objects) to the ObservableList persons . table is binded as: table.itemsProperty().bind(service