public PeerPropertiesTable(Simulation s) {
		super();

		sim = s;

		model = new PropertyTableModel();

		model.addTableModelListener(new TableModelListener() {
			public void tableChanged(TableModelEvent tme) {
				if (tme.getType() == TableModelEvent.UPDATE) {
					// Automatically apply user-entered values upon table value change.

					PeerAgent agent = sim.getCurrentPeerAgent();

					if (agent == null)
						return;

					try {
						String name = (String)model.getValueAt(0, 1);
						PeerAddress address = new PeerAddress((String)model.getValueAt(1, 1));
						double longitude = Double.parseDouble((String)model.getValueAt(2, 1));
						double latitude = Double.parseDouble((String)model.getValueAt(3, 1));
						float speed = Float.parseFloat((String)model.getValueAt(4, 1));
						float bearing = (float)Math.toRadians(Double.parseDouble((String)model.getValueAt(5, 1)));

						GeoLocation location = new GeoLocation(longitude, latitude, agent.getPeer().getLocation().getAccuracy());
						GeoVelocity velocity = new GeoVelocity(speed, bearing); 

						agent.getPeer().setName(name);
						agent.getPeer().setAddress(address);
						sim.updateCurrentPeerAgent(location, velocity);
					} catch (NumberFormatException nfe) {
						JOptionPane.showMessageDialog(sim.getFrame(), "Please a valid number.");
					} catch (GeoLocationException gle) {
						JOptionPane.showMessageDialog(sim.getFrame(), gle.getMessage());
					} catch (PeerAddressException pae) {
						JOptionPane.showMessageDialog(sim.getFrame(), "Please a valid address.");
					}

					sim.refresh();
				}
			}
		});

		setModel(model);
	}