public PeerList(Simulation s) {
		super();

		sim = s;

		setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

		(getSelectionModel()).addListSelectionListener(new ListSelectionListener() {
			public void valueChanged(ListSelectionEvent event) {
				// Automatically refresh UI upon peer selection.
				ListSelectionModel listSelectionModel = (ListSelectionModel)event.getSource();
				if (!listSelectionModel.isSelectionEmpty())
					sim.refresh();
			}
		});

		model = new DefaultListModel();

		setModel(model);
	}