HTMLPanel inherits the add(Widget)
method from com.google.gwt.user.client.ui.Panel
, but doesn't override it. This leads to an UnsupportedOperationException when called.
Would there be any problems if it was overriding it like FlowPanel does?
@Override
public void add(Widget w) {
add(w, getElement());
}
Background: HTMLPanel can be constructed faster than FlowPanel (innerHTML vs DOM manipulation). But after construction, it doesn't currently allow to add elements dynamically*.
* except for the not so useful method add(Widget widget, String id)
, which makes it impossible to use the HTMLPanel twice in a document.