int u = 0;
    public NodePanel() {            addMouseListener(new MouseAdapter() {	  	  public void mousePressed(MouseEvent e) {	    	    if (!m_stopped) {	      return;	    }	    if ((e.getModifiers() & e.BUTTON1_MASK) == e.BUTTON1_MASK && 		!e.isAltDown()) {	      Graphics g = NodePanel.this.getGraphics();	      int x = e.getX();	      int y = e.getY();	      int w = NodePanel.this.getWidth();	      int h = NodePanel.this.getHeight();	      int u = 0;	      FastVector tmp = new FastVector(4);	      for (int noa = 0; noa < m_numAttributes; noa++) {		if (m_inputs[noa].onUnit(g, x, y, w, h)) {		  tmp.addElement(m_inputs[noa]);		  selection(tmp, 			    (e.getModifiers() & e.CTRL_MASK) == e.CTRL_MASK			    , true);		  return;		}	      }	      for (int noa = 0; noa < m_numClasses; noa++) {		if (m_outputs[noa].onUnit(g, x, y, w, h)) {		  tmp.addElement(m_outputs[noa]);		  selection(tmp,			    (e.getModifiers() & e.CTRL_MASK) == e.CTRL_MASK			    , true);		  return;		}	      }	      for (int noa = 0; noa < m_neuralNodes.length; noa++) {		if (m_neuralNodes[noa].onUnit(g, x, y, w, h)) {		  tmp.addElement(m_neuralNodes[noa]);		  selection(tmp,			    (e.getModifiers() & e.CTRL_MASK) == e.CTRL_MASK			    , true);		  return;		}	      }	      NeuralNode temp = new NeuralNode(String.valueOf(m_nextId), 					       m_random, m_sigmoidUnit);	      m_nextId++;	      temp.setX((double)e.getX() / w);	      temp.setY((double)e.getY() / h);	      tmp.addElement(temp);	      addNode(temp);	      selection(tmp, (e.getModifiers() & e.CTRL_MASK) == e.CTRL_MASK			, true);	    }	    else {	      //then right click	      Graphics g = NodePanel.this.getGraphics();	      int x = e.getX();	      int y = e.getY();	      int w = NodePanel.this.getWidth();	      int h = NodePanel.this.getHeight();	      int u = 0;	      FastVector tmp = new FastVector(4);	      for (int noa = 0; noa < m_numAttributes; noa++) {		if (m_inputs[noa].onUnit(g, x, y, w, h)) {		  tmp.addElement(m_inputs[noa]);		  selection(tmp, 			    (e.getModifiers() & e.CTRL_MASK) == e.CTRL_MASK			    , false);		  return;		}					      }	      for (int noa = 0; noa < m_numClasses; noa++) {		if (m_outputs[noa].onUnit(g, x, y, w, h)) {		  tmp.addElement(m_outputs[noa]);		  selection(tmp,			    (e.getModifiers() & e.CTRL_MASK) == e.CTRL_MASK			    , false);		  return;		}	      }	      for (int noa = 0; noa < m_neuralNodes.length; noa++) {		if (m_neuralNodes[noa].onUnit(g, x, y, w, h)) {		  tmp.addElement(m_neuralNodes[noa]);		  selection(tmp,			    (e.getModifiers() & e.CTRL_MASK) == e.CTRL_MASK			    , false);		  return;		}	      }	      selection(null, (e.getModifiers() & e.CTRL_MASK) == e.CTRL_MASK			, false);	    }	  }	});    }