public void processMouseMotionEvent(MouseEvent e) {
		if (e.getID() == MouseEvent.MOUSE_DRAGGED || e.getID() == MouseEvent.MOUSE_MOVED) {
			mouseX = e.getX();
			mouseY = e.getY();
			sim.getFrame().repaint();
		}

		if (e.getID() == MouseEvent.MOUSE_DRAGGED && !sim.isSimulationRunning()) {
			// Drag the currently selected peer.
			PeerAgent agent = sim.getCurrentPeerAgent();
			if ((agent != null) && calculatePeerRectangle(agent).contains(mouseX, mouseY)) {
				sim.updateCurrentPeerAgent(new GeoLocation(xToLongitude(mouseX), yToLatitude(mouseY), agent.getPeer().getLocation().getAccuracy()));
				sim.refresh();
			}
		}

		super.processMouseMotionEvent(e);
	}