In this section, you will learn how to create ToolTip.
The ToolTip is the element of graphical user interface used in the conjunction with a cursor pointer. In SWT, the method setToolTipText() of class TabItem sets the tooltip text. In the given example, we have create tabs using the class TabFolder and TabItem to show the toolTipText.
The method tabFolder.getSelection() returns the selected TabItem.
Here is the code of ToolTipExample.java
Output will be displayed as:
Liked it! Share this Tutorial