Package com.vaadin.tests.layouts

Source Code of com.vaadin.tests.layouts.GridLayoutInsidePanel2

package com.vaadin.tests.layouts;

import com.vaadin.server.LegacyApplication;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.LegacyWindow;

public class GridLayoutInsidePanel2 extends 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);
    }

}
TOP

Related Classes of com.vaadin.tests.layouts.GridLayoutInsidePanel2

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.