We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c98329 commit 0cd29fcCopy full SHA for 0cd29fc
1 file changed
javafx/src/main/java/com/baeldung/view/SearchController.java
@@ -62,14 +62,16 @@ private void initialize() {
62
63
private void initTable() {
64
tableView = new TableView<>(FXCollections.observableList(masterData));
65
+ tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
66
+
67
TableColumn id = new TableColumn("ID");
68
id.setCellValueFactory(new PropertyValueFactory("id"));
69
TableColumn name = new TableColumn("NAME");
70
name.setCellValueFactory(new PropertyValueFactory("name"));
71
TableColumn employed = new TableColumn("EMPLOYED");
72
employed.setCellValueFactory(new PropertyValueFactory("isEmployed"));
-
73
tableView.getColumns().addAll(id, name, employed);
74
75
dataContainer.getChildren().add(tableView);
76
}
77
0 commit comments