diff options
author | Anastasia Smirnova <anasmi@utu.fi> | 2018-03-27 12:15:21 +0300 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-03-27 12:15:21 +0300 |
commit | 8b2da456bdbda7cd493bd9dc11bbb1dead368d5c (patch) | |
tree | a73f7425ef39f750ee58e50d62be25ae04ada25e /server/src | |
parent | 34780e7b6d93c01bd8bcd40583ad7c21137e7588 (diff) | |
download | vaadin-framework-8b2da456bdbda7cd493bd9dc11bbb1dead368d5c.tar.gz vaadin-framework-8b2da456bdbda7cd493bd9dc11bbb1dead368d5c.zip |
Fix example in JavaDoc (#10758)
Diffstat (limited to 'server/src')
-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> |