public Menu getMenu(Control parent) {
   if (lastMenu != null) {
     lastMenu.dispose();
   }
   lastMenu = new Menu(parent);
   createEntries(lastMenu);
   return lastMenu;
 }
 public void dispose() {
   if (lastMenu != null) {
     lastMenu.dispose();
     lastMenu = null;
   }
 }