gwtgwt-widgets

GWT Nothing shows up after changes


I am learning GWT Widget. I am having a simple EntryPoint class using which I am adding a Widget(ToggleButton). Initially it was working. Then I have just added the changes to change the attributes of my button. Then nothing came up in the specific HTML. I have done a clean-build too.

Below is my onModuleLoad()

@Override
public void onModuleLoad()
{
    // Create Instance for your Widget
    ToggleButton aToggleButton = new ToggleButton("Normal State", "Clicked State");

// Apply required style as per your wish
aToggleButton.setPixelSize(50, 10);
aToggleButton.setTitle("My first Simple Widget");

// Add it to the panel of your wish
RootPanel.get().add(aToggleButton);
}

Am I missing something. But I am sure that I haven't done anything apart from adding the lines that setting the size and title.


Solution

  • There's nothing wrong with this code. Compile to javascript, clean browser cache and try again.