Swing components have the ability to set tool tips - or text
that appears when the mouse hovers above the component. When using tool
tips from an accessibility standpoint, if a description was not set (see
Image 5), use setAccessibleDescription( ).
Then, the accessibility model will use the tool tip text as a substitution.
This is another example of how creating accessible applications can benefit
all users.

import javax.swing.*;
class ToolTipTest extends JFrame {
JButton button1;
ToolTipTest() {
super ("ToolTip Test");
button1 = new JButton("Button 2");
button1.setToolTipText("The Electric Shock Button");
this.getContentPane().add(button1);
this.setSize(200,75);
this.setVisible(true);
}
public static void main (String args[]) {
ToolTipTest ttt = new ToolTipTest();
}
}
The next page will discuss the mnemonics and accelerators.