This is example that shows how create a TreePanel with layers from a map. GeoExt does not provide a LayerTree component. Instead, to create a tree with nodes that represent layers, create a tree with a LayerContainer at the root, or add LayerNodes directly.
Note that the js is not minified so it is readable. See layercontainer.js.