1

Sorry but I see no way to use it at all!

If I create GWT project with sample code, then SDK is generating a page with a HTML table where positions for sample TextBox-es and Button are already marked. So, if I open sample file with GWT designer and move button slightly down-right, I will get errors during run.

If I create GWT project without sample code, then GWT designer appears to be unable to open file with empty GUI.

Is there any way to design GUI from scratch or to see GWT designer usage sample?

Thanks

BradleyDotNET
  • 60,462
  • 10
  • 96
  • 117
Dims
  • 47,675
  • 117
  • 331
  • 600

1 Answers1

2

The problem is when you want GWT to create sample code for you, it puts the container parts of layout hard-coded in your projects html file. The generated sample uses RootPanel.get("someId").add(someWidget); to access these containers. When you open designer and move these widgets around, designer generates RootPanel.get("someId").add(someWidget,left,top); which doesn't work with this method.

On another note, when you want to create a class from scratch and open it with designer, you can simply add a reference to RootPanel to get around "this is not a gui class issue" such as :

public class SimpleClass {
    RootPanel r = RootPanel.get();
    public SimpleClass() {}
}
pistolPanties
  • 1,880
  • 13
  • 18
  • Thanks! That worked! But now I don't understant how to tie this class to regular EntryPoint! EntryPoint descendant made by wizard uses static RootPanel methods to access the areas... – Dims Oct 28 '11 at 13:31
  • I usually create with sample code and edit the html page to remove those static parts so I get a clean start on my generated entry point class. Alternatively you can also implement EntryPoint interface with your new class but you need to edit your modules gwt.xml file. There is a line there that defines which class is your entrypoint. But then again either you need to create a new html file or edit the old one – pistolPanties Oct 28 '11 at 14:26