Java Sun >
Guidelines Home Page >  Java Look and Feel Design Guidelines
>
Part III: The Components of the Java Foundation Classes
> 9: Menus and Toolbars >
Tool Tips
  Previous Next Contents/Index/Search


Tool Tips

A tool tip provides information about a component or area whenever the user moves the pointer to that area (and does not press a mouse button). These small rectangles of text can be used anywhere in your application.

A tool tip is commonly associated with an interface element, where it provides a short description of the component's function. If a component has a keyboard shortcut, the shortcut is automatically displayed in the tool tip.

Figure 146 shows a tool tip that describes a slider.

Figure 146   Tool Tip for a Slider

 

Slider Tool Tip

You can also use tool tips with application graphics. A chart might have one tool tip that provides the name and size of the graphic or several tool tips that describe different areas of the graphic.

Figure 147 shows a tool tip on an area of the bar chart in the sample applet, Retirement Savings Calculator.

Figure 147   Tool Tip on an Area Within a Chart

 

Tool Tip for Area of Chart

You can adjust the timing of the tool tips in your application. By default, a tool tip appears after the user rests the pointer on the component or area for 750 milliseconds. It disappears after 4 seconds or when the user activates the component or moves the pointer away from the component.

For keyboard operations in tool tips, see Table 31.

  Allow for the possibility that tool tips might become lengthy in some locales. Always use an onset of 250 milliseconds for tool tips and leave them displayed for 15 seconds.

  Make tool tips active by default, but provide users a way to turn them off for the entire application. For example, you might provide a checkbox either in the View menu or in a preferences dialog box.

  Use headline capitalization for short tool tips and sentence capitalization for longer ones. Try to be consistent within your application.

  A tool tip is specified in its associated component (and not by calling the JToolTip class directly).

  If a component has a tool tip, the AccessibleDescription for that component is automatically set to the tool tip text.

For details on the Java 2 Accessibility API, see Support for Accessibility.


Java Look and Feel Design Guidelines, second edition.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved.
Previous Next Contents/Index/Search
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
JavaOne Banner Java 8 banner (182)