From 284b7337bce99eb25de02972283e2b16e971b32d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marko=20Gr=C3=B6nroos?= Date: Wed, 27 May 2009 12:30:44 +0000 Subject: [PATCH] TabSheet example in Book examples. svn changeset:8031/svn branch:6.0 --- .../vaadin/tests/book/BookTestApplication.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/com/vaadin/tests/book/BookTestApplication.java b/src/com/vaadin/tests/book/BookTestApplication.java index e0a6309f79..9d116edbcd 100644 --- a/src/com/vaadin/tests/book/BookTestApplication.java +++ b/src/com/vaadin/tests/book/BookTestApplication.java @@ -1022,7 +1022,22 @@ public class BookTestApplication extends com.vaadin.Application { } void example_TabSheet(Window main, String param) { - if (param.equals("icon")) { + if (param.equals("simple")) { + // Create an empty tab sheet. + TabSheet tabsheet = new TabSheet(); + + // Create a component to put in a tab and put + // some content in it. + VerticalLayout myTab = new VerticalLayout(); + myTab.addComponent(new Label("Hello, I am a Tab!")); + + // Add the component to the tab sheet as a new tab. + tabsheet.addTab(myTab); + + // Get the Tab holding the component and set its caption. + tabsheet.getTab(myTab).setCaption("My Tab"); + + } else if (param.equals("icon")) { final TabSheet tabsheet = new TabSheet(); tabsheet.addTab(new Label("Contents of the first tab"), -- 2.39.5