New feature of Javafx 1.3: Tooltip at Control and Node

Today I’m going to show how to get the Tooltip on rollover of any object. Firstly check out the API of JavaFX 1.3 ToolTip. We use Tooltip on various application for the reference to the user. We especially use this feature for Object,Button or any Image.

Now the question comes what to do when I would like to make a tooltip for any shape of Javafx like : Rectangle, Circle, Polygon, etc. or on any Nodes. So for that you need to have a small trick .
Let’s have a code of making one Rectangle:

In above code we have used the rollover event in Group, which helps us to run the tooltip and rollout event for the disable of tooltip.
Finally it’s finished we have made the Tooltip shown at Nodes too.