aboutsummaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorAnastasia Smirnova <anasmi@utu.fi>2018-03-27 12:15:21 +0300
committerIlia Motornyi <elmot@vaadin.com>2018-03-27 12:15:21 +0300
commit8b2da456bdbda7cd493bd9dc11bbb1dead368d5c (patch)
treea73f7425ef39f750ee58e50d62be25ae04ada25e /server/src
parent34780e7b6d93c01bd8bcd40583ad7c21137e7588 (diff)
downloadvaadin-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.java8
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(&quot;Login&quot;);
* layout.addComponent(loginBox);
*
* // Create the first field which will be focused
* TextField username = new TextField(&quot;User name&quot;);
- * loginBox.addField(&quot;username&quot;, username);
+ * loginBox.addComponent(username);
*
* // Set focus to the user name
* username.focus();
*
* TextField password = new TextField(&quot;Password&quot;);
- * loginBox.addField(&quot;password&quot;, password);
+ * loginBox.addComponent(password);
*
* Button login = new Button(&quot;Login&quot;);
- * loginBox.getFooter().addComponent(login);
+ * loginBox.addComponent(login);
* </pre>
*
* <p>