Lindomir Avelar
unread,Oct 23, 2011, 7:47:31 AM10/23/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Hi guys! I solved a trouble a I need to broadcast it!!
First you need to put a <div tag> with a ID like this in your html
code
<div id="main">
</div>
Second in your ImageViewer.java you have to add a VerticalPanel (you
can use GWT designer it is very easy) see the code below
public class ImageViewer implements EntryPoint {
private VerticalPanel VLayout;
private TabPanel tabPanel;
private Button btnNewButton;
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();
rootPanel.setSize("800", "600");
rootPanel.add(getVLayout(), 156, 52);
THIS IS THE MAGIC I AM PUTING ALL MY VLayout INTO MY
HTML DIV
RootPanel.get("main").add(VLayout);
}
private VerticalPanel getVLayout() {
if (VLayout == null) {
VLayout = new VerticalPanel();
VLayout.setSize("340px", "221px");
VLayout.add(getTabPanel());
}
return VLayout;
}
private TabPanel getTabPanel() {
if (tabPanel == null) {
tabPanel = new TabPanel();
tabPanel.setSize("287px", "169px");
tabPanel.add(getBtnNewButton(), "New tab", false);
}
return tabPanel;
}
private Button getBtnNewButton() {
if (btnNewButton == null) {
btnNewButton = new Button("New button");
btnNewButton.setSize("104px", "33px");
}
return btnNewButton;
}
}
I am a begginer but it was very hard to me discovery that!! Thank you
every one guys