0
没有设置提示这样的设置提示
if (tooltipText != null) {
Label lb = new Label(column.getText());
lb.setTooltip(new Tooltip(tooltipText));
column.setText(null);
column.setGraphic(lb);
}
不幸的是那么将存在丑陋的副作用的方法。
我们设置空列的文本,但的菜单项调用column.getText()。如果我们不这样做,头文件中会出现双重名称。如何解决?通过CSS的手段假设..
这个答案不会删除副作用 How to add a tooltip to a TableView header cell in JavaFX 8
非常感谢! – DmitriyAntonov