ToolTipDemo Constructor
// Set the title for this demo, and an icon used to represent this
// demo inside the SwingSet2 app.
super(swingset, "ToolTipDemo", "toolbar/ToolTip.gif");
// Set the layout manager.
JPanel p = getDemoPanel();
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
p.setBackground(Color.white);
// Create a Cow to put in the center of the panel.
Cow cow = new Cow();
cow.getAccessibleContext().setAccessibleName(getString("ToolTipDemo.accessible_cow"));
// Set the tooltip text. Note, for fun, we also set more tooltip text
// descriptions for the cow down below in the Cow.contains() method.
cow.setToolTipText(getString("ToolTipDemo.cow"));
// Add the cow midway down the panel
p.add(Box.createRigidArea(new Dimension(1, 150)));
p.add(cow);