String () { ListModel<TemplatesGroup> model = myProjectTypeList.getModel(); StringJoiner builder = new StringJoiner(", "); for (int i = 0; i < model.getSize(); i++) { builder.add(model.getElementAt(i).getName()); } return builder.toString(); }