Advertisement
Guest User

Untitled

a guest
Feb 14th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. VerticalLayout layout = new VerticalLayout();
  2.  
  3. usernameField = new TextField("Username:");
  4. layout.addComponent(usernameField);
  5. passwordField = new PasswordField("Password:");
  6. layout.addComponent(passwordField);
  7.  
  8. Button login = new Button("Login");
  9. login.setClickShortcut(KeyCode.ENTER, null);
  10. login.addClickListener(e -> Notification.show(
  11. usernameField.getValue() + ":" + passwordField.getValue()));
  12. layout.addComponent(login);
  13.  
  14. Window window = new Window();
  15. window.setContent(layout);
  16. addWindow(window);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement