Bug 338825 Rename Display.getAppMenuBar() to getMenuBar().
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet348.java
static boolean createdScreenBar = false;
	
	static void createMenuBar(Shell s) {
		Menu bar = Display.getCurrent().getAppMenuBar();
		boolean hasAppMenuBar = (bar != null);
		if (bar == null) {
			bar = new Menu(s, SWT.BAR);
		} 
		
		
		
		if (!createdScreenBar || !hasAppMenuBar) {
			MenuItem item = new MenuItem(bar, SWT.CASCADE);
			item.setText("File");
			Menu menu = new Menu(item);
			item.setMenu(menu);
			menu.addMenuListener(new MenuListener() {
				public void menuHidden(MenuEvent e) {
					System.out.println("Menu closed: " + e);
				}
				public void menuShown(MenuEvent e) {
					System.out.println("Menu open: " + e);
				}
				
			});
			MenuItem newWindow = new MenuItem(menu, SWT.PUSH);