The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dialloma (72) [Avatar] Offline
#1
Hello,

I have a little problem with TabPanel and HorizotaleSplitPanel. My problem is that: I have a tabPanel, and in the first tab, I want to add a HorizontalSplitPanel. But when I execute the code, in my first Tab there are not the widgets. I see the splitter but any widget. I post my code and please test it in your computer and if there are an errors help me.

1-The entryPoint



public class YoGWT implements EntryPoint {

public void onModuleLoad() {
DockPanel docker = new DockPanel();
docker.setWidth("100%");
docker.setStyleName("Docker");

HTML logo = new HTML(" Bienvue sur l'espage de partage de document");
docker.add(logo, DockPanel.NORTH);


PanelCentre panelCentre = new PanelCentre();

// Create a tab bar with three items.
TabPanel tabPanel = new TabPanel();
tabPanel.add(panelCentre, "Documents", true);
tabPanel.add(new HTML("Options lkdjfhkljgkljdkj kkldjgkljdfkl hjf" +
"ldfjhlkdfjkhljfklhjkljhkljgfdl" +
"hlkfdjhjdfjhljfkghjdfg
" +
"lkfjklhjklfjgkhljfkljhkl" +
"lkfjhklfjgkhljldfkjh
"), "Options", true);
tabPanel.add(new HTML("Administration"), "Administration", true);
tabPanel.selectTab(0);


docker.add(tabPanel, DockPanel.CENTER);
RootPanel.get().add(docker);

}
}


2-) Leftpanel





public class PanelGauche extends Composite {

private VerticalPanel vPanel = new VerticalPanel();

private HTML panelTitle = new HTML("RĂ©pertoires ");

public PanelGauche() {
initWidget(vPanel);
vPanel.setSpacing(5);
setStyleName("PanelGauche");

vPanel.add(panelTitle);
vPanel.add(new HTML("lskjdfsklj kljdfkdgkjhdgkjh kjdhgkjhdjfkgh
"));
vPanel.add(new HTML("lskjdfsklj kljdfkdgkjhdgkjh kjdhgkjhdjfkgh
"));
vPanel.add(new HTML("lskjdfsklj kljdfkdgkjhdgkjh kjdhgkjhdjfkgh
"));
vPanel.add(new HTML("lskjdfsklj kljdfkdgkjhdgkjh kjdhgkjhdjfkgh
"));
}
}


3- RigthPanel


public class PanelDroite extends Composite {

private VerticalPanel vPanel = new VerticalPanel();
private HTML panelTitle = new HTML("Fichiers");

private Grid grid = new Grid();

public PanelDroite() {
initWidget(vPanel);
vPanel.setSpacing(5);
setStyleName("PanelDroite");

vPanel.add(panelTitle);
vPanel.add(grid);
vPanel.add(new HTML("lskjdfsklj kljdfkdgkjhdgkjh kjdhgkjhdjfkgh"));
vPanel.add(new HTML("lskjdfsklj kljdfkdgkjhdgkjh kjdhgkjhdjfkgh
"));
vPanel.add(new HTML("lskjdfsklj kljdfkdgkjhdgkjh kjdhgkjhdjfkgh
"));

}
}


4- CenterPanel


public class PanelCentre extends Composite {

private HorizontalSplitPanel hSplitPanel = new HorizontalSplitPanel();
private PanelGauche panelGauche = new PanelGauche();
private PanelDroite panelDroite = new PanelDroite();

public PanelCentre() {
initWidget(hSplitPanel);

hSplitPanel.setLeftWidget(panelGauche);
hSplitPanel.setRightWidget(panelDroite);
}
}



If you see an errors please correct it for me.
Thanks in advance
dialloma