code: public Collection<String> getSelectedCities()
      {
          Set<String> cities = new TreeSet<String>();
          for (JCheckBox checkBox : checkBoxes)
          {
              if (checkBox.isSelected())
              {
                  cities.add(checkBox.getText());
              }
          }
          return cities;
      }
docs: Returns the cities that have been selected as part of the itinerary.
  @return A list of cities.