ecco il codice
HO UN PANNELLO PRINCIPALE DIVISO IN DUE LAYER ,SOPRA C'E' UN TASTO E SOTTO UN PANNELLO CON LE TAB

codice:
public class MainPanel extends VLayout {

    private static MainPanel istance = null;

    public static MainPanel getInstance() {

        if (istance == null) {
            istance = new MainPanel();

        }
        return istance;
    }

private MainPanel() {

VLayout vLayout = new VLayout();

        HLayout top = new HLayout(2); // top layer
        top.setID("TOP");

        HLayout down = new HLayout(2); // down layer
        down.setID("DOWN");
        
        ButtonPanel button = new ButtonPanel(); //class with button
        button.setID("BUTTON");

        TabPanel tab = new TabPanel();// class with tab
        tab.setID("TABLAYOUT");
        
        top.addMember(button);
        down.addMember(tab);
        vLayout.addMember(top);
        vLayout.addMember(down);
        addMember(vLayout);
classe "TabPanel"
codice:
 final TabSet toptabset = new TabSet();
        toptabset.setID("TABSET");

        toptabset.setTabBarPosition(Side.TOP);
        toptabset.setTabBarAlign(Side.LEFT);
        toptabset.setWidth100();
        toptabset.setHeight100();

        Tab maintab = new Tab("MAIN", "");
        maintab.setID("MAINTAB");
        toptabset.addTab(maintab);  //add a new tab to toptabset
classe button
codice:
 IButton hideButton = new IButton();
        hideButton.setID("SHOW");
        hideButton.setTitle("show");
        hideButton.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                 
              COSA DEVO METTERE PER INVIARE IL COMANDO ALLA CLASSE TABPANEL PER FAR APRIRE UNA NUOVA TAB? ( se faccio tabset.addTab(maintab); non va perchè sono classi distinte)


            }
        });