public PanelWithActionsAndCloseButton(ContentManager contentManager, @NonNls String helpId) {
super(new BorderLayout());
myContentManager = contentManager;
myHelpId = helpId;
myContentManager.addContentManagerListener(new ContentManagerAdapter(){
public void contentRemoved(ContentManagerEvent event) {
if (event.getContent().getComponent() == PanelWithActionsAndCloseButton.this) {
dispose();
myContentManager.removeContentManagerListener(this);
}