private static void initForMac(final ExitAction exitAction, final PrefsAction prefsAction, final AboutAction aboutAction) {
private static void initForMac(final Action exitAction, final Action prefsAction, final Action aboutAction) {
    private static void initForMac(final ExitAction exitAction,				   final PrefsAction prefsAction,				   final AboutAction aboutAction) {	MacUtils.init(new ApplicationAdapter() {		public void handleAbout(ApplicationEvent e) {		    final ActionEvent event =			new ActionEvent(e.getSource(), 0, "About");		    // opens dialog, so I think we need to do this to		    // avoid deadlock		    SwingUtilities.invokeLater(new Runnable() {			    public void run() {				try {				    aboutAction.actionPerformed(event);				} catch (Exception e) {				    ErrorMsg.reportStatus(e);				}			    }			});		    e.setHandled(true);		}		public void handleOpenFile(ApplicationEvent e) {		    final File file = new File(e.getFilename());		    SwingUtilities.invokeLater(new Runnable() {			    public void run() {				try {				    openFrame(file);				} catch (Exception e) {				    ErrorMsg.reportStatus(e);				}			    }			});		    e.setHandled(true);		}		public void handlePreferences(ApplicationEvent e) {		    e.setHandled(true);		    final ActionEvent event =			new ActionEvent(e.getSource(), 0, "Preferences");		    SwingUtilities.invokeLater(new Runnable() {			    public void run() {				try {				    prefsAction.actionPerformed(event);				} catch (Exception e) {				    ErrorMsg.reportStatus(e);				}			    }			});		}		public void handleQuit(ApplicationEvent e) {		    exitAction.actionPerformed(new ActionEvent(e.getSource(), 0,							       "Exit"));		    e.setHandled(true);		}	    });    }