Differences between setContent and addComponent?

Hi,
Could somebody point me the differences between
setContent
and
addComponent
?
thanks

With setContent() you replace the ComponentContainer and with addComponent() you add a Component to the ComponentContainer. The default ComponentContainer is VerticalLayout. Thus setContent() is typically used, if you want to change layout behavior or replace the whole container.

Thanks for the explanation Gunar.