private void setSkillTextField() { String personCode = person.getPersonCode(); try { this.list = skillQueries.getSkillsOfPerson(personCode); } catch (SQLException e) { e.printStackTrace(); } StringBuilder sb = new StringBuilder(); for (Skill skill : list) { sb.append(skill.getSkillName() + ", "); } taSkills.setText(sb.toString()); }
private void displayPersonTypes(Person person) { this.person = person; List<Address> list = null; try { list = addressQueries.getPersonAddresses(person.getPersonCode()); } catch (SQLException e) { e.printStackTrace(); } cbTypeModel = new DefaultComboBoxModel<Address>(); cbTypeModel.removeAllElements(); for (Address address : list) { cbTypeModel.addElement(address); } cbType.setModel(cbTypeModel); }