blob: 6273b928389b8dcf17791d9dd97ebded642d07f9 (
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
|
package com.vaadin.tests.layouts;
import com.vaadin.Application;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.UI.LegacyWindow;
public class GridLayoutInsidePanel2 extends Application.LegacyApplication {
private Layout layout;
@Override
public void init() {
LegacyWindow w = new LegacyWindow("Main");
setMainWindow(w);
layout = (Layout) w.getContent();
GridLayout gl = new GridLayout(1, 1);
gl.setSizeUndefined();
Label l = new Label("This should be visible");
l.setWidth("100px");
gl.addComponent(l);
layout.setSizeUndefined();
layout.addComponent(gl);
}
}
|