package com.github.daytron.twaattin;

import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.annotations.Widgetset;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

/**
 *
 */
@Theme("mytheme")
@Widgetset("com.github.daytron.twaattin.MyAppWidgetset")
public class MyUI extends UI {

    @Override
    protected void init(VaadinRequest vaadinRequest) {
        final VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        setContent(layout);

        Button button = new Button("Click Me");
        button.addClickListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                layout.addComponent(new Label("Thank you for clicking"));
            }
        });
        layout.addComponent(button);

    }

    @WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
    @VaadinServletConfiguration(ui = MyUI.class, productionMode = false)
    public static class MyUIServlet extends VaadinServlet {
    }
}

@@ -1,8 +1,1144 @@
+/* %0A * The MIT License%0A *%0A * Copyright 2015 Ryan Gilera.%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0A * of this software and associated documentation files (the %22Software%22), to deal%0A * in the Software without restriction, including without limitation the rights%0A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A * copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in%0A * all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN%0A * THE SOFTWARE.%0A */%0A
 package 
@@ -1453,144 +1453,53 @@
 .ui.
-Button;%0Aimport com.vaadin.ui.Button.ClickEvent;%0Aimport com.vaadin.ui.Label;%0Aimport com.vaadin.ui.UI;%0Aimport com.vaadin.ui.VerticalLayout
+HorizontalSplitPanel;%0Aimport com.vaadin.ui.UI
 ;%0A%0A/
@@ -1596,18 +1596,24 @@
 c class 
-My
+Twaattin
 UI exten
@@ -1619,16 +1619,69 @@
 nds UI %7B
+%0A    private static final long serialVersionUID = 1L;
 %0A%0A    @O
@@ -1755,307 +1755,286 @@
     
-final VerticalLayout layout = new VerticalLayout();%0A        layout.setMargin(true);%0A        setContent(layout);%0A%0A        Button button = new Button(%22Click Me%22);%0A        button.addClickListener(new Button.ClickListener() %7B%0A            @Override%0A            public void buttonClick(ClickEvent event) %7B
+HorizontalSplitPanel panel = new HorizontalSplitPanel();%0A        %0A        panel.setFirstComponent(new LoginScreen());%0A        %0A        TimelineScreen aTimelineScreen = new TimelineScreen();%0A        panel.setSecondComponent(aTimelineScreen);%0A        aTimelineScreen.fillTweets();
 %0A   
@@ -2038,24 +2038,25 @@
         
+%0A
         
 layout.a
@@ -2051,63 +2051,46 @@
     
-layout.addComponent(new Label(%22Thank you for clicking%22)
+panel.setSplitPosition(300,Unit.PIXELS
 );%0A 
@@ -2096,21 +2096,16 @@
         
- 
-   %7D
 %0A       
@@ -2109,46 +2109,24 @@
     
-%7D);%0A        layout.addComponent(button
+setContent(panel
 );%0A%0A
@@ -2250,18 +2250,24 @@
 on(ui = 
-My
+Twaattin
 UI.class

Bring two UI screens together in the parent component