Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8139460 | 8u72 | Jonathan Giles | P3 | Closed | Fixed | b03 |
FULL PRODUCT VERSION :
jdk1.8.0_45-i586-b14
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
If nested TableColumns are added to a TableView, and then those TableColumns are replaced by TableColumns without nesting, the height of the column header will still remain the same height as the original nested columns.
REGRESSION. Last worked in version 8u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the code below and then press the button.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The nested column headers will get replaced by a single column header with the height of a single column header.
ACTUAL -
The nested column headers will get replaced by a single column header with the height of two column headers.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Test extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
TableColumn childCol = new TableColumn("Child");
TableColumn parentCol = new TableColumn("Parent");
parentCol.getColumns().add(childCol);
TableView tableView = new TableView();
Button button = new Button("Change column header");
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent arg0) {
// Replace with single column header after showing the stage
tableView.getColumns().setAll(childCol);
// You will see that the single column header is still the same
// height as the nested column header was
}
});
VBox vbox = new VBox();
vbox.getChildren().addAll(tableView, button);
primaryStage.setScene(new Scene(vbox));
primaryStage.show();
tableView.getColumns().setAll(parentCol);
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Recreate the TableView every time I need to change the column headers.
jdk1.8.0_45-i586-b14
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
If nested TableColumns are added to a TableView, and then those TableColumns are replaced by TableColumns without nesting, the height of the column header will still remain the same height as the original nested columns.
REGRESSION. Last worked in version 8u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the code below and then press the button.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The nested column headers will get replaced by a single column header with the height of a single column header.
ACTUAL -
The nested column headers will get replaced by a single column header with the height of two column headers.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Test extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
TableColumn childCol = new TableColumn("Child");
TableColumn parentCol = new TableColumn("Parent");
parentCol.getColumns().add(childCol);
TableView tableView = new TableView();
Button button = new Button("Change column header");
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent arg0) {
// Replace with single column header after showing the stage
tableView.getColumns().setAll(childCol);
// You will see that the single column header is still the same
// height as the nested column header was
}
});
VBox vbox = new VBox();
vbox.getChildren().addAll(tableView, button);
primaryStage.setScene(new Scene(vbox));
primaryStage.show();
tableView.getColumns().setAll(parentCol);
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Recreate the TableView every time I need to change the column headers.
- backported by
-
JDK-8139460 TableColumn header height does not shrink when removing nested TableColumns
-
- Closed
-
- duplicates
-
JDK-8138855 TableHeaderRow height not shrink after remove columns
-
- Closed
-
-
JDK-8139113 Impossible to shrink table header size with CSS
-
- Closed
-