void (Collection<? extends T> items) { DefaultListModel<T> model = myForm.getListModel(); model.removeAllElements(); for (T item : items) { model.addElement(item); } ScrollingUtil.ensureSelectionExists(getList()); }