public void processMouseEvent(MouseEvent e) {
		if (e.getID() == MouseEvent.MOUSE_EXITED) {
			mouseX = -1;
			mouseY = -1;
			sim.getFrame().repaint();
		}

		if (e.getID() == MouseEvent.MOUSE_PRESSED) {
			// Select the peer.
			int i = 0;
			for (PeerAgent agent : sim.getPeerAgents()) {
				if (calculatePeerRectangle(agent).contains(mouseX, mouseY)) {
					sim.setCurrentPeerIndex(i);
					sim.refresh();
					break;
				}
				i++;
			}
		}

		super.processMouseEvent(e);
	}