/** * Adds a tab. * * @param card the tab content. * @param name the tab name. */ public void addTab(final WComponent card, final String name) { WContainer titledCard = new WContainer(); WText title = new WText("<b>[" + name + "]:</b><br/>"); title.setEncodeText(false); titledCard.add(title); titledCard.add(card); deck.add(titledCard); final TabButton button = new TabButton(name, titledCard); button.setAction( new Action() { public void execute(final ActionEvent event) { deck.makeVisible(button.getAssociatedCard()); } }); btnPanel.add(button); }