Issue
Does anyone know how to add a tooltip to a column header in a TableView ?
There are many places where are explained how to add the tooltip to data cells, but I didn't find a way to add the tooltip to header.
Using the tool ScenicView, I can see that the headers are Labels inside a TableColumnHeader object, but It seems that It is not a public object.
Any suggestions ?
Solution
TableColumn<Person, String> firstNameCol = new TableColumn<>();
Label firstNameLabel = new Label("First Name");
firstNameLabel.setTooltip(new Tooltip("This column shows the first name"));
firstNameCol.setGraphic(firstNameLabel);
Answered By - James_D
Answer Checked By - Clifford M. (JavaFixing Volunteer)