How to code widget with childwidgets

Hi, I’m new to vaadin and try to develop my own component, because no vaadin component or addon fits my needs.
Now I paint some HTML to the widgetelement and I can see this correct in my browser.
But now I wonder how I can display some components if I add them in my application to my component it works fine.
I use updateFromUIDL method to write my HTML code which depends on the attributes and I’ll paint a widget within this HTML.
Is there a method or something to paint widgets at the latest position?

For Example:

	public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
		if (client.updateComponent(this, uidl, true)) {
			return;
		}
		this.client = client;
		paintableId = uidl.getId();
		
		if(uidl.hasAttribute("head")) {
			String head = uidl.getStringAttribute("head");
			if(uidl.hasAttribute("lines")) {
				String lines[] = uidl.getStringArrayAttribute("lines");
				for(String s: lines) {
          if(s.contains("widget") == true) {
            //
            //head = head + widget;
            //or something like this?
          } else {
            head = head + s;
          }
				}
			}
			getElement().setInnerHTML("<table>" + head + "</table>");
		}
	}

And finally sorry if you can’t understand me, I’m not a native speaker

Have a look at the
source code of VCssLayout
.