Dear,

How can I handle a double click on the header of a ContentPanel?

I am trying to expand/collapse the panel (collapsible is set to true) when the user double clicks on the header, with the following code, but it's not reacting to a double click (also a ClickHandler is not working)... What is wrong?

Code:
panel.getHeader().addHandler(new DoubleClickHandler() {
@Override public void onDoubleClick(DoubleClickEvent event) {
if (panel.isCollapsed()) {
panel.expand();
} else {
panel.collapse();
}
}
}, DoubleClickEvent.getType());
Best regards,
Koen