public static JCheckBoxMenuItem menuItemCB(String title, String accelerator, final P1<Boolean> onChange) {
    	final JCheckBoxMenuItem ret = new JCheckBoxMenuItem(title);
        ret.addActionListener(SwingUtil.toActionListener(new P0() {public void e() {
        	onChange.e(ret.isSelected());
		}}));
        if (accelerator != null) {
			ret.setAccelerator(KeyStroke.getKeyStroke(accelerator));
		}
		return ret;
    }

//    public static JTextField tfPref(String key, int cols) {
//    	String def = "";
//		return tfPref(key, cols, def);
//    }