What is the way to handle Click on GWT FlowPanel
What you need to do here is wrap your FlowPanel in a FocusPanel. A FocusPanel contain all possible handler and thus will enable you to have a ClickHandler set to it.
Another method would be to create your own widget extending the flowpanel and implementing the necessary interface in order to be able to contain a ClickHandler.
I personally would recommend the first method. It's simpler, faster to code and won't slow down your application.
Actually, you go for this:
FlowPanel fPanel = new FlowPanel() {
@Override
public void onAttach() {
super.onAttach();
super.addDomHandler(handler, ClickEvent.getType()); // handler is the instance
// of your ClickHandler
}
}
Cheers!!!