JMenuItem prefsItem = file.add(new CmdOpenWindow(
file.add(new CmdOpenWindow(
    private void createFileMenu() {        JMenu file = new JMenu("File");        file.setMnemonic('F');        myMenuBar.add(file);        // Create the New menu item.        JMenuItem newItem = file.add(new CmdNewEditor());        newItem.setMnemonic('N');        KeyStroke ctrlN = KeyStroke.getKeyStroke(KeyEvent.VK_N,                KeyEvent.CTRL_MASK);        newItem.setAccelerator(ctrlN);        file.add(newItem);        // Create the Open menu item.        JMenuItem openItem = file.add(new CmdOpenEditor());        openItem.setMnemonic('O');        KeyStroke ctrlO = KeyStroke.getKeyStroke(KeyEvent.VK_O,                KeyEvent.CTRL_MASK);        openItem.setAccelerator(ctrlO);        // Create the Save menu item.        JMenuItem saveItem = file.add(new CmdSaveEditor());        saveItem.setMnemonic('S');        KeyStroke ctrlS = KeyStroke.getKeyStroke(KeyEvent.VK_S,                KeyEvent.CTRL_MASK);        saveItem.setAccelerator(ctrlS);        // Create the Save As menu item.        JMenuItem saveAsItem = file.add(new CmdSaveAsEditor());        saveAsItem.setMnemonic('A');        file.addSeparator();        // Create the Print menu item.        JMenuItem printItem = file.add(new CmdPrint());        printItem.setMnemonic('P');        KeyStroke ctrlP = KeyStroke.getKeyStroke(KeyEvent.VK_P,                KeyEvent.CTRL_MASK);        printItem.setAccelerator(ctrlP);        // Create the Preferences menu item.        JMenuItem prefsItem = file.add(new CmdOpenWindow(                "org.tigris.gef.base.PrefsEditor", "Preferences..."));        file.addSeparator();        // Create the Exit menu item.        JMenuItem exitItem = file.add(myQuitAction);        KeyStroke altF4 = KeyStroke.getKeyStroke(KeyEvent.VK_F4,                KeyEvent.ALT_MASK);        exitItem.setAccelerator(altF4);    }