Method addComponent() of Component class used.