Advertisement
Gigi95

Login

Apr 17th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.07 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.library.librarytest;
  7.  
  8. import com.vaadin.ui.Alignment;
  9. import com.vaadin.ui.Button;
  10. import com.vaadin.ui.Component;
  11. import com.vaadin.ui.HorizontalLayout;
  12. import com.vaadin.ui.LoginForm;
  13. import com.vaadin.ui.PasswordField;
  14. import com.vaadin.ui.TextField;
  15.  
  16. /**
  17.  *
  18.  * @author gee
  19.  */
  20. public class MainLayout extends LoginForm {
  21.   @Override
  22.         protected Component createContent(TextField userNameField, PasswordField passwordField, Button loginButton) {
  23.             HorizontalLayout layout = new HorizontalLayout();
  24.             layout.setSpacing(true);
  25.             layout.setMargin(true);
  26.  
  27.             layout.addComponent(userNameField);
  28.             layout.addComponent(passwordField);
  29.             layout.addComponent(loginButton);
  30.             layout.setComponentAlignment(loginButton, Alignment.BOTTOM_LEFT);
  31.             return layout;
  32.         }
  33.  
  34.        
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement