public void beforeChildAdded(Component newChild, Component refChild) { if (!(newChild instanceof Popup)) throw new UiException("Unsupported child for Combobutton: " + newChild); if (getFirstChild() != null) throw new UiException("At most one popup is allowed, " + this); super.beforeChildAdded(newChild, refChild); }