private void editSelectedItem() {
    int index = myList.getSelectedIndex();
    if (index >= 0) {
      T newValue = editSelectedItem(myListModel.get(index));
      if (newValue != null) {
        myListModel.set(index, newValue);
      }
    }
  }
private void editSelectedItem()