@Override protected void updateItem(Person arg0, boolean arg1) { super.updateItem(arg0, arg1); if (arg0 == null) { setText(""); } else { setText(arg0.getFirstname() + ", " + arg0.getLastname()); } }
private List<Person> createList() { List<Person> rv = new ArrayList<Person>(); { Person p = new Person("Tom", "Schindl"); p.setStreet("Bahnhofstrasse 1"); p.setZip("6020"); p.setCity("Innsbruck"); rv.add(p); } { Person p = new Person("John", "Doe"); p.setStreet("Mainstreet 1"); p.setZip("E10E4"); p.setCity("San Francisco"); rv.add(p); } return rv; }