I'm not sure that you should not include trivial overrides, but you can call add(Widget, Element) yourself if you want.
I think one of the ideas with HTMLPanel is that you can add a widget anywhere in the DOM panel, so it needs add () methods that force you to specify where to add the widget. This way you can build an HTMLPanel using some complex html, for example: "<div>...<div id="container"/>...<div>" , then call add(myWidget, "container") .
btw: add(Widget w, String id) is just a convience method. It does not create a new element with an identifier, but searches for an element with an identifier and calls add(Widget, Element) .
source share