Hi,

I am relatively new to GWT, so I still often have no clue how to add event listeners. Alas, this was somehow easier in good old swing awt days. There seem to be so many ways to add events, but none of them work as desired - and the examples are often very simple f.e. button event handling.
I also do not know when I need to sink events. Sometimes there are also special methods for adding a certain event listener "addXListener", but there is also a general method only called "addListener".

In my special case, I want a component to listen to the resize event of the browser window. So I tried to override the onWindowReisze method
Code:
mainPanel = new LayoutContainer() {
      @Override
      protected void onWindowResize(int width, int height) {
        Info.display("Hallo", Integer.toString( height ));
        
      }
    };
no reaction.
Also this would not work:
[CODE]
mainPanel.addListener( Events.BrowserEvent, new Listener<ComponentEvent>() {
@Override
public void handleEvent(ComponentEvent be) {
Info.display("Hallo", "");
}
}
);
[CODE]

Thanks for help in advance.