i totally agree, but how do I SET children? that's why I used
setParent, because there is no "set" method. how can I set the children
of a component? if that works, then the dynamic panelGrid should be no
problem...
UIComponent parent = ...; // The component you want to be the parent
UIComponent child = ...; // The component that will be the new child
parent.getChildren().add(child); // Implicitly hooks up in both directions
Note that since getChildren() returns a List, you can use any of the List methods to manipulate it, such as iterating, sorting, or inserting into a specific spot. For example, if you'd wanted the new child to be the first one instead, you could have said:
parent.getChildren().add(0, child);
By the way, the same principle applies to the Map returned by getAttributes() ... you are not restricted to just get() and put().
Craig

