Konrad Höffner
Konrad Höffner

Reputation: 12207

Difference between Vaadin getContent.addComponent() and addComponent()?

If I extend a component like Form in Vaadin, would be any difference between those two?

1. this.getContent().addComponent();

2. this.addComponent();

Upvotes: 0

Views: 277

Answers (2)

Korhan Ozturk
Korhan Ozturk

Reputation: 11308

There's no difference between this.getContent().addComponent(); and this.addComponent(); when you consider Window and Panel components. The component gets added to the content with either call. In Form however, there is no method such as addComponent().

Upvotes: 0

default locale
default locale

Reputation: 13456

There is no getContent() method in Form class

If you mean Panel.getContent method then there is no difference between those two methods.

Upvotes: 2

Related Questions