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);