Design pattern: As you may look from the diagram given below, containers collect components. Sometimes you want to accumulate a container to another container. So, a container could be an element. Composite design pattern is used in GUI elements to achieve this. A composite object is an object, which have other objects. Composite design pattern manipulates composite objects just like you manipulate individual elements.