diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/Component.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Component.java b/server/src/main/java/com/vaadin/ui/Component.java index 039c25e288..fe15ff7ba5 100644 --- a/server/src/main/java/com/vaadin/ui/Component.java +++ b/server/src/main/java/com/vaadin/ui/Component.java @@ -1012,22 +1012,22 @@ public interface Component extends ClientConnector, Sizeable { * 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> |