@Override
	public void valueChanged(ListSelectionEvent event) {
		if (gui.connected & firstloaded & !event.getValueIsAdjusting()) {
			if (!settingRow) {
				settingRow = true;
				if (event.getSource().equals(
						mainTablePane.getListSelectionModel())) {
					for (TablePane reference : referenceTable) {
						try {
							reference.setSelectedRow(mainTablePane);
						} catch (SQLException e) {
							gui.handleSQLException(e);
						} finally {
							settingRow = false;
						}
					}
				} else {
					for (TablePane reference : referenceTable) {
						if (reference.getListSelectionModel().equals(
								event.getSource())) {
							try {
								mainTablePane.setReferencedID(reference);
							} catch (SQLException e) {
								if (e.getErrorCode() == 0) {
									// no current row selected
								} else {
									gui.handleSQLException(e);
								}
							} finally {
								settingRow = false;
							}
						}
					}
				}
			}
		}
	}