Try this:

 Panel main = new Panel();

       main.add(new Button())
        Viewport viewport = new Viewport(main);

JAVA code:

public void onModuleLoad() {
       Panel main = new Panel();
       Button but= new Button ("Example of hello world");
       but.addListener(new ButtonListenerAdapter()
       {
           @Override
          public void onClick(Button button, EventObject e)  {
             MessageBox.alert("Gwt-Ext", "<< hello World example
>>");
          }
       });
main.add(but);
       Viewport viewport = new Viewport(main);
   }

Main.gwt.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<module>
       <inherits name="com.google.gwt.user.
>
> User"/>
>    <inherits name="com.gwtext.GwtExt"/>

<inherits name="com.google.gwt.core.Core"/>
    <inherits name="com.google.gwt.user.History"/>

>        <entry-point class="org.NitinSawant.client.GWTEntryPoint"/>
>        <!-- Do not define servlets here, use web.xml -->
> </module>


And don't forget to add necessary jars (gwt-dev-windows.jar,
gwt-servlet.jar, gwt-user.jar, gwtext.jar) and the ext folder in /web/js to
the project .

Good luck.





2009/3/27 Nitin Sawant <[email protected]>

>
> How to integrate GWT-EXT in Netbeans 6.5?
>
> I have downloaded: GWT, GWTEXT and EXT,
>
> I did all steps as described on page-
> http://www.ongwt.com/post/2007/10/01/A-basic-Introduction-to-GWT-EXT
>
> but it doesn't work, It just shows Blank page, I've added button to
> it,
>
> JAVA code:
>
> public void onModuleLoad() {
>        RootPanel rootPanel = RootPanel.get ();
>        Button but= new Button ("Example of hello world");
>        but.addListener(new ButtonListenerAdapter()
>        {
>            @Override
>           public void onClick(Button button, EventObject e)  {
>              MessageBox.alert("Gwt-Ext", "<< hello World example
> >>");
>           }
>        });
>        rootPanel.add (but, 300,300);
>    }
>
> HTML code:
>
> <html>
>    <head>
>        <meta http-equiv="Content-Type" content="text/html;
> charset=UTF-8">
>        <meta name='gwt:module'
> content='org.NitinSawant.Main=org.NitinSawant.Main'>
>        <title>NetBeans 6.5 - Nitin Sawant</title>
>        <link rel="stylesheet" type="text/css" href="js/ext/resources/
> css/ext-all.css"/>
>        <link rel="stylesheet" type="text/css"
> href="org.NitinSawant.Main/GwtExt.css"/>
>        <link rel="stylesheet" type="text/css" href="js/ext/resources/
> css/xtheme-aero.css" />
>        <script type="text/javascript" src="js/ext/adapter/yui/yui-
> utilities.js"></script>
>        <script type="text/javascript" src="js/ext/adapter/yui/ext-yui-
> adapter.js"></script>
>        <script type="text/javascript" src="js/ext/ext-all.js"></
> script>
>    </head>
>    <body>
>        <div id="slot1"></div>
>        <!--div id="loading" class="loading"><p>Loading...</p></div-->
>        <script language="javascript" src="org.NitinSawant.Main/
> org.NitinSawant.Main.nocache.js"></script>
>    </body>
> </html>
>
> Main.gwt.xml file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <module>
>        <inherits name="com.google.gwt.user.User"/>
>    <inherits name="com.gwtext.GwtExt"/>
>        <entry-point class="org.NitinSawant.client.GWTEntryPoint"/>
>        <!-- Do not define servlets here, use web.xml -->
> </module>
>
> help me,
>
>
>
> thanks & regards,
> Nitin Sawant
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" 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/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to