I want to perform an event when I click on a panel, in the same way this happens when the user clicks on a button.
I need this in order to handle events on click for this panel.
I want to perform an event when I click on a panel, in the same way this happens when the user clicks on a button.
I need this in order to handle events on click for this panel.
You have to use GWT
FocusPanel
which makes its contents focusable, and adds the ability to catch mouse and keyboard events. So wrap yourpanel
insideFocusPanel
.One more possibility(without FocusPanel)
I would make a new widget ( extending in this example an Absolute panel ) that implements the HasClickHandlers interface like this
And then in my code I would do it like this