Hi,
I'm trying to do a simple hello, world application with a button that displays a dialog. I'm adapting the GWT example code to use Gxt. When I run the application and click the button, the dialog is spread out over the page (see attachment). I copied portions of code from the example com.extjs.gxt.samples.explorer.client.pages.DialogPage. I'm using Eclipse and Cypal, so I didn't follow the screencast exactly, since Cypal does some of the configuration for you. This happens in hosted and web modes.
Thanks for any help you can give me.
Code:package net.juniper.client; import com.extjs.gxt.ui.client.Style; import com.extjs.gxt.ui.client.Style.Scroll; import com.extjs.gxt.ui.client.event.ButtonEvent; import com.extjs.gxt.ui.client.event.ComponentEvent; import com.extjs.gxt.ui.client.event.SelectionListener; import com.extjs.gxt.ui.client.widget.Dialog; import com.extjs.gxt.ui.client.widget.MessageBox; import com.extjs.gxt.ui.client.widget.VerticalPanel; import com.extjs.gxt.ui.client.widget.Window; import com.extjs.gxt.ui.client.widget.button.Button; import com.extjs.gxt.ui.client.widget.form.LabelField; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.RootPanel; public class SearchIncident implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { Image img = new Image("http://code.google.com/webtoolkit/logo-185x175.png"); Button button = new Button("Click me Ext"); VerticalPanel vPanel = new VerticalPanel(); // We can add style names. vPanel.setHorizontalAlign(Style.HorizontalAlignment.CENTER); vPanel.add(img); ////////////////////////////////////////////////////////////////////// final Dialog mysimple = new Dialog(); mysimple.setHeading("Dialog Test"); mysimple.setButtons(Dialog.YESNO); mysimple.setBodyStyleName("pad-text"); mysimple.addText("bla, bla, bla"); mysimple.setScrollMode(Scroll.AUTO); mysimple.setHideOnButtonClick(true); Button simpleButton = new Button("Simple", new SelectionListener<ComponentEvent>() { public void componentSelected(ComponentEvent ce) { MessageBox.confirm("Demo App", "GXT message", null); } }); vPanel.add(simpleButton); ////////////////////////////////////////////////////////////////////// // Add image and button to the RootPanel RootPanel.get().add(vPanel); } }