static JMenuItem createJMenuItem(ResourceManager rm, String itemId) {
        final boolean autoMnemonic = rm.getInt("auto-mnemonic") == 1;
        final String itemKey = "item." + itemId;
        final char mn = rm.getChar(itemKey + ".mnemonic");
        final String shortcutKey = itemKey + ".shortcut";
        final JMenuItem o;
        if (rm.isTrue(itemKey + ".checkbox")) {
            o = new JCheckBoxMenuItem();
        } else if (rm.isTrue(itemKey + ".subgroup")) {
            o = createJMenu(rm, itemId);
            ButtonGroup buttonGroup = new ButtonGroup();
            boolean selected = false;
            for (final String id : rm.get(itemKey + ".items").split(",", -1)) {
                final JMenuItem sub = createJMenuItem(rm, itemId + id);
                o.add(sub);
                buttonGroup.add(sub);
                if (!selected) {
                    sub.setSelected(true);
                    selected = true;
                }
            }
        } else {
            o = new JMenuItem();
        }
        if (rm.containsKey(shortcutKey)) {
            KeyStroke ks = Utilities.getKeyStroke(rm.get(shortcutKey));
            if (ks != null) {
                o.setAccelerator(ks);
            }
        }
        o.setText(rm.get(itemKey) + (autoMnemonic ? "(" + mn + ")" : ""));
        o.setMnemonic(mn);
        o.setActionCommand(itemId);
        o.setIcon(getImageIcon(String.format("menu-%s.png", itemId)));
        o.setDisabledIcon(getImageIcon(String.format("menu-disabled-%s.png", itemId)));
        return o;
    }