/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/

Ticket1772.java?h=8.6.0.rc1' type='application/atom+xml'/>
summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tickets/Ticket1772.java
blob: 5307963596fac08601c6d21a388f89870648e45d (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
package com.vaadin.tests.tickets;

import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.TextField;
import com.vaadin.ui.UI.LegacyWindow;

public class Ticket1772 extends com.vaadin.LegacyApplication {

    @Override
    public void init() {

        final LegacyWindow main = new LegacyWindow(getClass().getName()
                .substring(getClass().getName().lastIndexOf(".") + 1));
        setMainWindow(main);

        Button b = new Button("Add content");
        main.addComponent(b);

        final GridLayout gridLayout = new GridLayout(2, 2);
        main.addComponent(gridLayout);

        b.addListener(new Button.ClickListener() {
            int counter = 0;

            @Override
            public void buttonClick(ClickEvent event) {

                gridLayout
                        .addComponent(new TextField("Content " + (++counter)));

            }
        });

    }

}