Custom Vaadin Widget: from Gwt LayoutPanel's??

I am experimenting with developing a highly interactive widget, using pure Gwt only. I would like to embed it into a Vaadin application to be deployed, so I am trying to make it into a Vaadin widget.

I have been following Chapter 16 of the Vaadin book re integrating with the server side.

The Gwt widget to be integrated with the server side is based on extending a LayoutPanel (say DockLayoutPanel). I could not get it to work unless I change the Gwt widget to be based on extending a non-layout panel (e.g. DockPanel).

Could you advise on the following:

  1. Can a Gwt widget based on a layoutpanel be integated with the server side, so that it behave like a Vaadin widget?
  2. When I change the Gwt widget to be based extending a non-layout panel, I can get the integration with server-side to work. But then I could not figure out a way for this widget (and its parts) to resize properly when the browser window changes in size. Any suggestions on how to handle resize in such a widget?

Thank you in advance.

I found a way to do it.

It is indeed possible to write a custom GWT widget (which extends a layout panel such as DockLayoutPanel), wrapped in the way described in Chapter 16 of Book of Vaadin, so that it becomes a Vaadin widget that can be used in Vaadin server side program. It is also possible to do it with a GWT non-layout widget, but there might be resizing problem.

The reason why I want this is I need a very responsive interactive client side widget (say doing drawing and animation), but to have it embedded in a Vaadin framework for other desktop like programming.