contentPanel.setShowBorder(true);
contentPanel.setCollapsable(true);
contentPanel.setClosable(true);
contentPanel.addCloseHandler(new CloseHandler<ContentPanel>() {
public void onClose(CloseEvent<ContentPanel> contentPanelCloseEvent) {
DefaultNotifier.getInstance().confirm("Confirm", "Are you sure you want to close this panel?", new ConfirmCallback() {
public void handle(Boolean confirmed) {
contentPanel.setVisible(!confirmed);
}
});
}