List<DialogElement> containedElements = new ArrayList<DialogElement>();
WidgetCollectionParameters wcp = new WidgetCollectionParameters();
wcp.setContainedElements(tabs);
DialogElement tabPanelContainer = new WidgetCollection(wcp);
TabPanelParameters tpp = new TabPanelParameters();
tpp.setContainedElements(Arrays.asList(new DialogElement[] { tabPanelContainer }));
DialogElement tabPanel = new TabPanel(tpp);
WidgetCollectionParameters widgetCollectionForTabPanelParams = new WidgetCollectionParameters();
widgetCollectionForTabPanelParams.setContainedElements(Arrays.asList(new DialogElement[] { tabPanel }));
containedElements.add(new WidgetCollection(widgetCollectionForTabPanelParams));