* Sets the focus to this component.
*
* <pre>
- * Form loginBox = new Form();
+ * FormLayout loginBox = new FormLayout();
* loginBox.setCaption("Login");
* layout.addComponent(loginBox);
*
* // Create the first field which will be focused
* TextField username = new TextField("User name");
- * loginBox.addField("username", username);
+ * loginBox.addComponent(username);
*
* // Set focus to the user name
* username.focus();
*
* TextField password = new TextField("Password");
- * loginBox.addField("password", password);
+ * loginBox.addComponent(password);
*
* Button login = new Button("Login");
- * loginBox.getFooter().addComponent(login);
+ * loginBox.addComponent(login);
* </pre>
*
* <p>