All Packages  Class Hierarchy  This Package  Previous  Next  Index

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.

See How to Use Tool Tips in The Java Tutorial for further documentation.

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

 o JToolTip()
Creates a tool tip.

Method Index

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

Constructors

 o JToolTip
 public JToolTip()
Creates a tool tip.

Methods

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

Returns:
the ToolTipUI object that renders this component
 o 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
 o 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
 o setTipText
 public void setTipText(String tipText)
Sets the text to show when the tool tip is displayed.

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

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

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

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

All Packages  Class Hierarchy  This Package  Previous  Next  Index