List of usage examples for java.awt List remove
public void remove(int position)
From source file:org.yccheok.jstock.gui.MainFrame.java
public void createCountryMenuItem() { java.util.List<Country> countries = new ArrayList<Country>(Arrays.asList(Country.values())); // Czech is only for currency exchange purpose. countries.remove(Country.Czech); for (final Country country : countries) { // Ugly fix on spelling mistake. final JMenuItem mi; mi = (JRadioButtonMenuItem) jMenu6 .add(new JRadioButtonMenuItem(country.toHumanReadableString(), country.getIcon())); buttonGroup2.add(mi);// ww w.j ava2 s . co m mi.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { MainFrame.this.changeCountry(country); } }); if (jStockOptions.getCountry() == country) { ((JRadioButtonMenuItem) mi).setSelected(true); } } }