void (final File target) { final DefaultListModel listModel = new DefaultListModel(); final List<CheckoutStrategy> strategies = new ArrayList<>(); Collections.addAll(strategies, CheckoutStrategy.createAllStrategies(target, new File(myRelativePath), false)); strategies.add(new SvnTrunkCheckoutStrategy(target, new File(myRelativePath), false)); final List<File> targets = new ArrayList<>(5); for (CheckoutStrategy strategy : strategies) { final File result = strategy.getResult(); if (result != null && (! targets.contains(result))) { targets.add(result); } } Collections.sort(targets); for (File file : targets) { listModel.addElement(file); } myLocalTargetList.setModel(listModel); myLocalTargetList.setVisibleRowCount(4); myLocalTargetList.setPreferredSize(new Dimension(20, 80)); myLocalTargetList.setMinimumSize(new Dimension(20, 80)); myLocalTargetList.setSelectedValue(target, true); if (myLocalTargetList.getSelectedValues() == null && (! targets.isEmpty())) { myLocalTargetList.setSelectedIndex(0); } }