I was looking for information about updating data in a table format. I tried to change the model directly, but I get an error. I am changing the model, but the table is not updated, only when I move the column, the table shows the changed values.
To show you an example (13-6), I take a tutorial:
http://docs.oracle.com/javafx/2/ui_controls/table-view.htm#CJABIEED
And I change it, including the button and its action:
Button button = new Button("Modify"); button.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent arg0) { String name = table.getItems().get(0).getFirstName(); name = name + "aaaa"; table.getItems().get(0).setFirstName(name); } }); final VBox vbox = new VBox(); vbox.setSpacing(5); vbox.getChildren().addAll(label, table, button); vbox.setPadding(new Insets(10, 0, 0, 10));
I assume this is a mistake in the presentation of the table, but is there a chance to fix this?
Thank!
javafx-2 tableview
Antonio J. Jun 06 2018-12-06T00: 00Z
source share