This Java tips illustrates a method of setting a tool tip. Developer may use this tip to make the interface user friendly.If a JComponent such as a JButton is created using an action, the component will be created with the tool tip text in the action (see e855 Creating an Action). However, if the action does not have any tool tip text or if it must be changed, use JComponent.setToolTipText() is used.

 JComponent button = new JButton("Label");
    // Set tool tip text
    button.setToolTipText("tool tip text");