widget.setVisible(true);
Log.addLogger(logger);
messagePanel.add(widget);
final ImageButton collapseBtn = new ImageButton(Caption.IMAGES.toolCollapseDown());
messagePanel.getHeader().add(collapseBtn, Caption.CaptionRegion.RIGHT);
collapseBtn.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
parent.setCollapsed(messagePanel, true);
parent.invalidate();
parent.layout();
}