]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix example in JavaDoc (#10758)
authorAnastasia Smirnova <anasmi@utu.fi>
Tue, 27 Mar 2018 09:15:21 +0000 (12:15 +0300)
committerIlia Motornyi <elmot@vaadin.com>
Tue, 27 Mar 2018 09:15:21 +0000 (12:15 +0300)
server/src/main/java/com/vaadin/ui/Component.java

index 039c25e2883f783262c7d9f573f8954b008d26f0..fe15ff7ba53c2075ff0e643841e70693cc162ed3 100644 (file)
@@ -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>