public static JMenuItem menuItem(String title, String accelerator, P0 p0) {
        JMenuItem ret = new JMenuItem(title);
        if (p0!=null) {
        	ret.addActionListener(SwingUtil.toActionListener(p0));
        } else {
        	ret.setEnabled(false);
        }
        if (accelerator != null) {
			ret.setAccelerator(KeyStroke.getKeyStroke(accelerator));
		}
		return ret;
    }