@@ -0,0 +1,2214 @@
+package com.itmill.toolkit.tests.tickets;%0A%0Aimport com.itmill.toolkit.Application;%0Aimport com.itmill.toolkit.ui.Label;%0Aimport com.itmill.toolkit.ui.OrderedLayout;%0Aimport com.itmill.toolkit.ui.TextField;%0Aimport com.itmill.toolkit.ui.Window;%0A%0Apublic class Ticket2240 extends Application %7B%0A%0A    public static final String txt = %22%3Cp%3EThere are two main types of windows: application-level windows, and %22%0A            + %22%5C%22sub windows%5C%22.%3C/p%3E%3Cp%3EA sub window is rendered as a %5C%22inline%5C%22 popup window%22%0A            + %22 within the (native) browser window to which it was added. You can create%22%0A            + %22 a sub window by creating a new Window and adding it to a application-level window, for instance%22%0A            + %22 your main window. %3C/p%3E%3Cp%3E In contrast, you create a application-level window by%22%0A            + %22 creating a new Window and adding it to the Application. Application-level%22%0A            + %22 windows are not shown by default - you need to open a browser window for%22%0A            + %22 the url representing the window. You can think of the application-level%22%0A            + %22 windows as separate views into your application - and a way to create a%22%0A            + %22 %5C%22native%5C%22 browser window.%3C/p%3E%3Cp%3EDepending on your needs, it's also%22%0A            + %22 possible to create a new window instance (with it's own internal state)%22%0A            + %22 for each new (native) browser window, or you can share the same instance%22%0A            + %22 (and state) between several browser windows (the latter is most useful%22%0A            + %22 for read-only views).%3C/p%3E%3Cbr/%3E%3Cp%3EThis is the end.%3C/p%3E%22;%0A%0A    public void init() %7B%0A        Window w = new Window(getClass().getSimpleName());%0A        setMainWindow(w);%0A        setTheme(%22tests-tickets%22);%0A        createUI((OrderedLayout) w.getLayout());%0A    %7D%0A%0A    private void createUI(OrderedLayout layout) %7B%0A        layout.setHeight(null);%0A        layout.setStyleName(%22borders%22);%0A        // layout.setSizeFull();%0A        final Label l = new Label(txt);%0A        l.setContentMode(Label.CONTENT_XHTML);%0A        // l.setWidth(%22100%25%22);%0A%0A        TextField tf = new TextField(%22This is a textField%22);%0A        tf.setWidth(%22100%25%22);%0A%0A        layout.addComponent(tf);%0A        layout.addComponent(l);%0A    %7D%0A%7D%0A

Test case for #2240