diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/tests/book/BookTestApplication.java | 17 |
1 files changed, 16 insertions, 1 deletions
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"), |