Is there a way to apply FocusPanel in GWT with more than one child widget

I want to add mouseover events to a panel that contains more than one child widget. When I tried it using FocusPanel, I settled on the exception "SimplePanel can contain only one child widget." Is there any other way that I can use the mouse over events above a panel with multiple child widgets? For example, in the following code

<g:FocusPanel ui:field="parent"><childwidget1/><childwidget2/><childwidget3/><g:FocusPanel>

I need to add mouseover events to the parent panel. Please, help!

+4
source share
1 answer

Add a FlowPanel (or any panel in which you will find several widgets, depending on your layout needs) between the FocusPanel and child widgets:

 <g:FocusPanel ui:field="parent"> <g:FlowPanel> <my:childwidget1/> <my:childwidget2/> <my:childwidget3/> </g:FlowPanel> </g:FocusPanel> 
+3
source

All Articles