list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
list.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if(list.getSelectedIndices().length==0)return;
buttonDelete.setEnabled(true);
AddressBookEntry agent = listModel.getAgentAt(list.getSelectedIndex());
HumanPane c = new HumanPane(nc, (Human) agent, null, null, list);
setRightPane(c,agent);
}
});
if(addressBook.getSize()>0)list.setSelectedIndex(0);