private void removeEquipSets(Set<String> eqSetIds) { for (String key : eqSetIds) { JRadioButton w = eqSetWidgets.remove(key); eqSets.remove(w); eqSetPanel.remove(w); } }
public static void clearButtonGroup(ButtonGroup g) { if (g == null || g.getButtonCount() == 0) return; Enumeration e = g.getElements(); List<AbstractButton> list = new ArrayList<AbstractButton>(); while (e.hasMoreElements()) list.add((AbstractButton) e.nextElement()); for (AbstractButton b : list) { g.remove(b); } }
/** <code>removeAllBoxes</code> clears out the GUI panel's */ private void removeAllBoxes() { tempBonusWidgets.clear(); modifiersPanel.removeAll(); eqSetPanel.removeAll(); for (JRadioButton button : eqSetWidgets.values()) { eqSets.remove(button); } eqSetWidgets.clear(); }
/** * removes the specified radio menu button from the menu * * @param menuButton the JRadioButtonMenuItem to remove */ public void remove(JRadioButtonMenuItem menuButton) { frameRadioButtonMenuItemGroup.remove(menuButton); super.remove(menuButton); // cannot simply remove the radio menu button, as need to renumber the // keyboard shortcut keys as well. Hence, a call to refreshMenu is in order... refreshMenu(); // refresh the mnemonics associated with the other items }
public void remove(AbstractButton button) { button.removeActionListener(actionListener); bg.remove(button); }