How to add a tooltip to a TableView header cell in JavaFX 8

后端 未结 3 1832
时光说笑
时光说笑 2021-02-13 20:34

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 f

3条回答
  •  走了就别回头了
    2021-02-13 21:39

        TableColumn firstNameCol = new TableColumn<>();
        Label firstNameLabel = new Label("First Name");
        firstNameLabel.setTooltip(new Tooltip("This column shows the first name"));
        firstNameCol.setGraphic(firstNameLabel);
    

提交回复
热议问题