fileMenu.add(new PrintAction(printerJob));
fileMenu.add(new PrintAction(printerJob, this));
    private void initFileMenu(JMenuBar menubar) {                JMenu fileMenu = new JMenu("File");                fileMenu.add(new NewPlayerAction());                JMenuItem newMovieRecording = new JMenuItem("New Movie Recording");        newMovieRecording.setAccelerator(KeyStroke.getKeyStroke('N', menuShortcutKeyMask | InputEvent.ALT_MASK));                newMovieRecording.setEnabled(false);        fileMenu.add(newMovieRecording);                JMenuItem newAudioRecording = new JMenuItem("New Audio Recording");        newAudioRecording.setAccelerator(KeyStroke.getKeyStroke('N', menuShortcutKeyMask | InputEvent.ALT_MASK | InputEvent.CTRL_MASK));                newAudioRecording.setEnabled(false);        fileMenu.add(newAudioRecording);                fileMenu.addSeparator();                JMenuItem openFile = new JMenuItem("Open File...");        openFile.setAccelerator(KeyStroke.getKeyStroke('O', menuShortcutKeyMask));                openFile.addActionListener(new FileOpener());        fileMenu.add(openFile);                JMenuItem openURL = new JMenuItem("Open URL...");        openURL.setAccelerator(KeyStroke.getKeyStroke('U', menuShortcutKeyMask));                openURL.addActionListener(new URLOpener());        fileMenu.add(openURL);                JMenuItem openImageSequence = new JMenuItem("Open Image Sequence...");        openImageSequence.setAccelerator(KeyStroke.getKeyStroke('O', menuShortcutKeyMask | InputEvent.SHIFT_MASK));                openImageSequence.setEnabled(false);        fileMenu.add(openImageSequence);                JMenuItem openRecent = new JMenuItem("Open Recent");        openRecent.setEnabled(false);        fileMenu.add(openRecent);                fileMenu.add(new CloseAction(this));                fileMenu.addSeparator();                JMenuItem save = new JMenuItem("Save");        save.setAccelerator(KeyStroke.getKeyStroke('S', menuShortcutKeyMask));                save.setEnabled(false);        fileMenu.add(save);                JMenuItem saveAs = new JMenuItem("Save As...");        saveAs.setAccelerator(KeyStroke.getKeyStroke('S', menuShortcutKeyMask | InputEvent.SHIFT_MASK));                saveAs.setEnabled(false);        fileMenu.add(saveAs);                JMenuItem revertToSaved = new JMenuItem("Revert to Saved");        revertToSaved.setEnabled(false);        fileMenu.add(revertToSaved);                fileMenu.addSeparator();                JMenuItem share = new JMenuItem("Share...");        share.setAccelerator(KeyStroke.getKeyStroke('S', menuShortcutKeyMask | InputEvent.ALT_MASK));                share.setEnabled(false);        fileMenu.add(share);                JMenuItem export = new JMenuItem("Export...");        export.setAccelerator(KeyStroke.getKeyStroke('E', menuShortcutKeyMask));                export.setEnabled(false);        fileMenu.add(export);                fileMenu.addSeparator();                fileMenu.add(new PageSetupAction(printerJob));        fileMenu.add(new PrintAction(printerJob));                menubar.add(fileMenu);    }