removePanelButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if (count < RootPanel.get().getWidgetCount()) {
RootPanel.get().remove(RootPanel.get().getWidgetCount() - 1);
createdPanel.removeItem(createdPanel.getItemCount() - 1);
}
}
});
popup.setTitle("popup:");