panel.addTab("Tab 3", hsp);
TabSpec tab4 = new TabSpec("tab4", "Tab 4", null, new Label("Confent for Tab 4"), false).setMenuBuilder(new MenuBuilder() {
public void build(Menu menu) {
CheckMenuItem item = new CheckMenuItem("Disable", !panel.isTabEnabled("tab4"));
item.addListener(new MenuItemSelectionListener() {
public void selectionChanged(SelectionMenuItem item) {
panel.setTabEnabled("tab4", !item.isSelected());
}
});
menu.addItem(item);