Time for action – the main layout
Let's start by coding the main layout using our well known friend VerticalLayout
and the new guy HorizontalLayout
:
- Create a new Vaadin project. For this example, we will use layout-framework as project name and
LayoutFrameworkUI
as the UI class. - Create a new Java class
MainLayout
. - Let
MainLayout
extendVerticalLayout
:public class MainLayout extends VerticalLayout { }
- Add layouts for upper and lower sections of
MainLayout
:public class MainLayout extends VerticalLayout { private VerticalLayout upperSection = new VerticalLayout(); private HorizontalLayout lowerSection = new HorizontalLayout(); private VerticalLayout menuLayout = new VerticalLayout(); private VerticalLayout contentLayout = new VerticalLayout(); }
- Add ...
Get Vaadin 7 UI Design By Example Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.