Dodawanie resize listener / handler do VerticalPanel w GWT

Jak dodać słuchacza / obsługi do VerticalPanel tak, aby był uruchamiany, gdy rozmiar VerticalPanel zmienia się?

W zasadzie próbowałem:

VerticalPanel myPanel = new VerticalPanel();
//... code to add child widgets that may change the size of the parent vertical panel ...

myPanel.addHandler(new ResizeHandler() {
  public void onResize(final ResizeEvent event) {
    //... code to handle resize of vertical panel ...
  }

}, ResizeEvent.getType() );

ale przewodnik nie zostaje uruchomiony.

questionAnswers(2)

yourAnswerToTheQuestion