void (Collection<HgRepository> roots) { DefaultComboBoxModel model = new DefaultComboBoxModel(); for (HgRepository repo : roots) { model.addElement(repo); } repositorySelector.setModel(model); mainPanel.setVisible(roots.size() > 1); }