This example shows how to use the GeoExt.component.Map class.

Have a look at map.js to see how this is done.