aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tickets/Ticket2337.java
blob: 71034f7e3d2da7e87231c0c2b60a3566b2f91d26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.vaadin.tests.tickets;

import com.vaadin.server.LegacyApplication;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.LegacyWindow;

public class Ticket2337 extends LegacyApplication {

    GridLayout gl = new GridLayout(3, 1);

    @Override
    public void init() {
        LegacyWindow w = new LegacyWindow();
        setMainWindow(w);
        Button b = new Button("add", new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                gl.addComponent(new Label("asd"), 0, gl.getCursorY(), 2,
                        gl.getCursorY());

            }

        });
        w.addComponent(b);

        b = new Button("empty", new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                gl.removeAllComponents();
                ;

            }

        });
        w.addComponent(b);

        w.addComponent(gl);

    }

}