private void initMenu() {
JMenuBar menuBar = new JMenuBar();
menuBar.setBorder(null);
//Style.applyMenuStyle(menuBar, true);
MenuBuilder fileMenu = new MenuBuilder("File");
fileMenu.getJMenu().setMnemonic(KeyEvent.VK_F);
initFileMenu(fileMenu);
fileMenu.addAction(new ExitAction(this, "Quit"), KeyEvent.VK_P);
menuBar.add(fileMenu.getJMenu());
editMenu = new MenuBuilder("Edit");
editMenu.getJMenu().setMnemonic(KeyEvent.VK_E);
menuBar.add(editMenu.getJMenu());
initViewMenu(menuBar);
runMenu = new MenuBuilder("Run");
runMenu.getJMenu().setMnemonic(KeyEvent.VK_R);
menuBar.add(runMenu.getJMenu());
worldMenu = new MenuBuilder("Misc");
worldMenu.getJMenu().setMnemonic(KeyEvent.VK_O);
menuBar.add(worldMenu.getJMenu());
updateWorldMenu();
updateEditMenu();
updateRunMenu();
MenuBuilder helpMenu = new MenuBuilder("Help");
helpMenu.getJMenu().setMnemonic(KeyEvent.VK_H);
menuBar.add(helpMenu.getJMenu());
helpMenu.addAction(new OpenURLAction("Documentation (opens in browser)",
"http://www.nengo.ca/documentation"), KeyEvent.VK_F1);
helpMenu.addAction(new TipsAction("Tips and Commands", false), KeyEvent.VK_T);
boolean isMacOS = System.getProperty("mrj.version") != null;
if (!isMacOS) {
helpMenu.addAction(new AboutAction("About"), KeyEvent.VK_A);
}
menuBar.setVisible(true);
this.setJMenuBar(menuBar);
}