public class MyMenuFactory extends AbstractMDIMenuFactory { private final JMenu filemenu = new JMenu("File"); private final JMenu helpmenu = new JMenu("Help"); public SecondMenuFactory() { } @Override protected void initMenus() { JMenuItem exitItem = new JMenuItem(getDefaultExitAction("Exit")); JMenuItem aboutPluginsItem = new JMenuItem(getPluginsMenuFactory().getAboutPluginsAction()); helpmenu.add(aboutPluginsItem); filemenu.add(exitItem); Mbar.add(filemenu); Mbar.add(helpmenu); } }
public class MyMenuFactory extends AbstractMDIMenuFactory { private final JMenu filemenu = new JMenu("File"); private final JMenu helpmenu = new JMenu("Help"); public SimpleMenuFactory() { } @Override protected void initMenus() { JMenuItem exitItem = new JMenuItem(getDefaultExitAction("Exit")); JMenuItem aboutItem = new JMenuItem(createDefaultMDIAbout(null, false)); helpmenu.add(aboutItem); filemenu.add(exitItem); Mbar.add(filemenu); Mbar.add(helpmenu); } }
Copyright 2006-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences