From 8b2da456bdbda7cd493bd9dc11bbb1dead368d5c Mon Sep 17 00:00:00 2001 From: Anastasia Smirnova Date: Tue, 27 Mar 2018 12:15:21 +0300 Subject: Fix example in JavaDoc (#10758) --- server/src/main/java/com/vaadin/ui/Component.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server') 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. * *
-         * 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);
          * 
* *

-- cgit v1.2.3