Hi guys,
i need your help !!!
i have a big problem
i have a tab and into this tab there is a button when i press this button it should open a new tab
the problem is that the tab displayed behind the main panel
I write you a piece of code
main panel
TABPANEL
I put the tab button, that once pressed, will open a new tab.
Class button
thanks for your help!!
i need your help !!!
i have a big problem
i have a tab and into this tab there is a button when i press this button it should open a new tab
the problem is that the tab displayed behind the main panel
I write you a piece of code
main panel
Code:
public class MainPanel extends VLayout {
private static MainPanel istance = null;
public static MainPanel getInstance() {
if (istance == null) {
istance = new MainPanel();
}
return istance;
}
private MainPanel() {
.....
......
........
HLayout down = new HLayout(2);
TabPanel tab = new TabPanel();
down.addMember(tab);
this.addMember(down);
}
I put the tab button, that once pressed, will open a new tab.
Code:
public class TabPanel extends VLayout {
private TabSet toptabset = null;
public TabPanel() {
toptabset = new TabSet();
//method
void Tabtry() {
Buttons b1 = new Buttons(b1);
Tab tTab1 = new Tab();
tTab1.setPane(b1);
toptabset.addTab(tTab1);
toptabset.selectTab(tTab1);
}
Class button
Code:
IButton goButton = new IButton("GO");
goButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
final TabPanel p = new TabPanel();
p.Tabtry();
}
});
thanks for your help!!
Comment