1
下面我將光標設置爲HAND,但是一旦我的工具提示啓動手回到原始光標,直到我移動並重新激活懸停監聽器。有誰知道爲什麼發生這種情況?爲什麼我的setCursor()停止創建我的工具提示?
nodeB.hoverProperty().addListener(l->{
String[] splittedName = n.getName().split(";");
String descNames = splittedName[0];
String officeNames = splittedName[1];
System.out.println(officeNames);
Tooltip t = new Tooltip(officeNames);
nodeB.setCursor(Cursor.HAND);
Tooltip.install(nodeB, t);
});