a container C1 can be added to a container C2 if
1) C1 is not a window or its descendants
2) C1 is not a C2's parent
or IllegalArgumentException will be thrown
All overloaded versions of Container's add() method merely call addImpl method, whose comments said:
/* Check for correct arguments: index in bounds,
* comp cannot be one of this container's parents,
* and comp cannot be a window.
*/
here is part of addImpl code:
[This message has been edited by Mapraputa Is (edited September 25, 2000).]