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

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to