Apply the customs table to the table:
table.getStylesheets().addAll(getClass().getResource("hidden-tableview-headers.css").toExternalForm());
If the hidden-tableview-headers.css located in the same place as the class loading the css resource and containing the line:
.column-header-background { visibility: hidden; -fx-padding: -1em; }
The visibility: hidden attribute tells JavaFX not to draw a node, but to leave the field in which the header was. Since the title is 1 line high by the height of the text, you can tell the invisible title not to take up space by setting -fx-padding: -1em; .
jewelsea
source share