void renameNode(int nTargetNode) {
		String sName = (String) JOptionPane.showInputDialog(null, m_BayesNet.getNodeName(nTargetNode), "New name for node",
				JOptionPane.OK_CANCEL_OPTION);
		if (sName == null || sName.equals("")) {
			return;
		}
		try {
			while (m_BayesNet.getNode2(sName) >= 0) {
				sName = (String) JOptionPane.showInputDialog(null, "Cannot rename to " + sName
						+ ".\nNode with that name already exists.");
				if (sName == null || sName.equals("")) {
					return;
				}
			}
			m_BayesNet.setNodeName(nTargetNode, sName);
		    m_jStatusBar.setText(m_BayesNet.lastActionMsg());
		} catch (Exception e) {
			e.printStackTrace();
		}
		repaint();
	}