How to set a tooltip on a JavaFX Button?

前端 未结 3 619
青春惊慌失措
青春惊慌失措 2021-01-07 21:47

How can I set a title or a text that appears above a button when I hover it with the mouse?

3条回答
  •  轮回少年
    2021-01-07 22:16

    If you are using Scenebuilder, you can add tooltips by locating "Tooltip" under the Miscellaneous dropdown (Left panel) and dragging it to the node you want to install the tooltip. You can then specify various properties (Right panel) of the tooltip like style and text just as you would a normal Node.

提交回复
热议问题