Frame f = ComponentUtilities.getTopLevelParent(this); if (f != null) { MenuBar mb = f.getMenuBar(); Menu m = new Menu ("Cool"); mb.add (m); }