FileDocCategorySizeDatePackage
TreeLinkTest.javaAPI DocExample1215Sun Mar 11 21:28:36 GMT 2001None

TreeLinkTest

public class TreeLinkTest extends Applet

Fields Summary
TreeLayout
tl
Constructors Summary
Methods Summary
public voidinit()

		tl = new TreeLayout();
		setLayout(tl);
		Button root = new Button("This is the root");
		add("Root", root); tl.setRoot(root);
		Component x = new Label("A random label");
		add("label", x);tl.setParent(x, root);
		Component y;
		y = new TextField("Add any component");
		add("comp", y); tl.setParent(y, root);
		x = new List();
		((List)x).add("List entry");
		((List)x).add("Similarly useless list entry");
		add("list", x); tl.setParent(x, root);
		x=new Button("Extremely long and unnecessary button title");
		add("button", x); tl.setParent(x, y);
		x = new MyCanvas(getImage(getDocumentBase(), "icons/tools.gif"));
		add("image", x); tl.setParent(x, y);
	
public voidpaint(java.awt.Graphics g)

		super.paint(g);
		tl.paintLines(g, getBackground());