private JMenu getSubmenu(String name, int pos) { if (subMenus.get(name) == null) { JMenu menu = new JMenu(name); if (pos > -1) { insert(menu, pos); } else { add(menu); } subMenus.put(name, menu); } return subMenus.get(name); }
protected void addCheckboxItem(String action, String text, boolean selected) { items.put(action, add(makeCheckboxItem(action, text, selected))); }
protected void addRadioItem(String action, String text, String group) { items.put(action, add(makeRadioItem(action, text, group))); }
insert(item, pos); } else { add(item);