DecoratorPanel staticDecorator = new DecoratorPanel();
staticDecorator.setWidget(staticTreeWrapper);
// Create a dynamically generated tree and a container to hold it
final Tree dynamicTree = createDynamicTree();
dynamicTree.ensureDebugId("cwTree-dynamicTree");
ScrollPanel dynamicTreeWrapper = new ScrollPanel(dynamicTree);
dynamicTreeWrapper.ensureDebugId("cwTree-dynamicTree-Wrapper");
dynamicTreeWrapper.setSize("300px", "300px");
// Wrap the dynamic tree in a DecoratorPanel