ExecuteCompositeTargetEvent () { final ListModel model = myTargetList.getModel(); final int size = model.getSize(); final List<@NlsSafe String> names = new ArrayList<>(); for (int idx = 0; idx < size; idx++) { names.add((String)model.getElementAt(idx)); } final ExecuteCompositeTargetEvent event = new ExecuteCompositeTargetEvent(names); event.setPresentableName(myTfName.getText().trim()); return event; }