*/
	void addArcInto(int iChild) {
		String sChild = m_BayesNet.getNodeName(iChild);
		try {
			int nNodes = m_BayesNet.getNrOfNodes();
			boolean[] isNotAllowedAsParent = new boolean[nNodes];
			// prevent it being a parent of itself
			isNotAllowedAsParent[iChild] = true;
			// prevent a descendant being a parent, since it introduces cycles
			for (int i = 0; i < nNodes; i++) {
				for (int iNode = 0; iNode < nNodes; iNode++) {
					for (int iParent = 0; iParent < m_BayesNet.getNrOfParents(iNode); iParent++) {
						if (isNotAllowedAsParent[m_BayesNet.getParent(iNode, iParent)]) {
							isNotAllowedAsParent[iNode] = true;
						}
					}
				}
			}
			// prevent nodes that are already a parent
			for (int iParent = 0; iParent < m_BayesNet.getNrOfParents(iChild); iParent++) {
				isNotAllowedAsParent[m_BayesNet.getParent(iChild, iParent)] = true;
			}
			// count nr of remaining candidates
			int nCandidates = 0;
			for (int i = 0; i < nNodes; i++) {
				if (!isNotAllowedAsParent[i]) {
					nCandidates++;
				}
			}
			if (nCandidates == 0) {
				JOptionPane.showMessageDialog(null, "No potential parents available for this node (" + sChild
						+ "). Choose another node as child node.");
				return;
			}
			String[] options = new String[nCandidates];
			int k = 0;
			for (int i = 0; i < nNodes; i++) {
				if (!isNotAllowedAsParent[i]) {
					options[k++] = m_BayesNet.getNodeName(i);
				}
			}
			String sParent = (String) JOptionPane.showInputDialog(null, "Select parent node for " + sChild, "Nodes", 0,
					null, options, options[0]);
			if (sParent == null || sParent.equals("")) {
				return;
			}
			// update all data structures
			m_BayesNet.addArc(sParent, sChild);
		    m_jStatusBar.setText(m_BayesNet.lastActionMsg());
		    updateStatus();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}