composition </strong>;) and be done.</p>
So I've just changed the Element class to support not only a single ElementRenderer but several! And by the way I discovered the "varargs declaration" in Java:
public Element(
final String newId,
final Element newParent,
final ElementRenderer ... newElementRenderer) {
...
}</pre>
You can use it this way:</p>
Element element = new Element("myId", parent, new PanelRenderer(), new TextRenderer());</pre>
Nifty indeed :)</p>