FileDocCategorySizeDatePackage
ToolTipDemo.javaAPI DocExample5398Wed Aug 08 15:13:52 BST 2001None

ToolTipDemo

public class ToolTipDemo extends DemoModule
ToolTip Demo
version
1.2 07/22/99
author
Jeff Dinkins

Fields Summary
Constructors Summary
public ToolTipDemo(SwingSet2 swingset)
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);
    
Methods Summary
public static voidmain(java.lang.String[] args)
main method allows us to run as a standalone demo.

	ToolTipDemo demo = new ToolTipDemo(null);
	demo.mainImpl();