Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.squadd.UI; import com.squadd.technical.Display; import com.vaadin.navigator.View; import com.vaadin.ui.Label; import com.vaadin.ui.Panel; import com.vaadin.ui.VerticalLayout; import java.awt.Dimension; import java.awt.Toolkit; /** * * @author SharkNado */ public class ContentLayout extends VerticalLayout { private Panel contentPanel; public ContentLayout(Panel content) { contentPanel = content; contentPanel.setWidth(0.7 * Display.width + "px"); VerticalLayout vv = new VerticalLayout(); addComponent(contentPanel); } public Panel getContentPanel() { return contentPanel; } public void setContentPanel(Panel contentPanel) { this.contentPanel = contentPanel; } }