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

Is there a difference between addComponent(x) and getContent().addComponent(x)?


public class X extends Form
 public void doSomething()
  setContent(new HorizontalLayout());
  addComponent(new Button("button 1"));
  getContent().addComponent(new Button("button 2"));


there’s no difference between the two when you consider Window and Panel components. The component gets added to the content with either call. However the Form component does not have a setContent method or an addComponent method, although your code seems to indicate this.