-
Book Overview & Buying
-
Table Of Contents
Vaadin 7 Cookbook
If we have an application that works with bigger UI groups, it's nice to separate them with tabs. For example, we want to show different screens for our Contractors, Customers, Employees, and Help pages. The following screenshot shows the initial page of our application. We can see that the Home screen corresponds to the URL.

And if the user clicks on another tab, the URL has changed.

Carry out the following steps to create tabs bound with the URL:
Create a project with the main UI class called, for example, Demo.
public class Demo extends UI {…}We create a TabsURL class that extends TabSheet.
public class TabsURL extends TabSheet{…}Now we create an array of UI group names.
private static final String tabNames[] =
{"Home", "Contractors", "Customers", "Employees", "Help"};We use these names for creating tabs. We insert the createTabs() method into our TabsURL class. Each tab contains a vertical layout with a big label according to the tab's name.
private...
Change the font size
Change margin width
Change background colour