Where Am I? Class Hierarchy (JFC) All Classes (JFC)

Class com.sun.java.swing.JToolTip

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JToolTip

public class JToolTip
extends JComponent
implements Accessible

Used to display a "Tip" for a Component. Typically components provide api to automate the process of using ToolTips. For example, any Swing component can use the JComponent setToolTipText method to specify the text for a standard tooltip. A component that wants to create a custom ToolTip display can override JComponent's createToolTip method and use a subclass of this class.

Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.

See Also:
setToolTipText, createToolTip

Constructor Index

JToolTip()
Creates a tool tip.

Method Index

getAccessibleContext()
Get the AccessibleContext associated with this JComponent
getComponent()
getTipText()
Returns the text that is shown when the tool tip is displayed.
getUI()
Returns the L&F object that renders this component.
getUIClassID()
Returns the name of the L&F class that renders this component.
setComponent(JComponent)
Specifies the component that the tooltip describes.
setTipText(String)
Sets the text to show when the tool tip is displayed.
updateUI()
Notification from the UIFactory that the L&F has changed.

Constructors

JToolTip
 public JToolTip()
Creates a tool tip.


Methods

getUI
 public ToolTipUI getUI()
Returns the L&F object that renders this component.

Returns:
the ToolTipUI object that renders this component
updateUI
 public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.

Overrides:
updateUI in class JComponent
See Also:
updateUI
getUIClassID
 public String getUIClassID()
Returns the name of the L&F class that renders this component.

Returns:
"ToolTipUI"
Overrides:
getUIClassID in class JComponent
See Also:
getUIClassID, getUI
setTipText
 public void setTipText(String tipText)
Sets the text to show when the tool tip is displayed.

Parameters:
tipText - the String to display
getTipText
 public String getTipText()
Returns the text that is shown when the tool tip is displayed.

Returns:
the String that is displayed
setComponent
 public void setComponent(JComponent c)
Specifies the component that the tooltip describes.

See Also:
createToolTip
getComponent
 public JComponent getComponent()
Returns:
the component that the tooltip describes.
See Also:
createToolTip
getAccessibleContext
 public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this JComponent

Returns:
the AccessibleContext of this JComponent
Overrides:
getAccessibleContext in class JComponent

Where Am I? Class Hierarchy (JFC) All Classes (JFC)