protected Magnet addMagnet(final int index) {
		Magnet aMagnet = new Magnet((String) var_names.get(index),
				(String) var_types.get(index),
				(String) var_measures.get(index), (String) var_descriptions
						.get(index), index);
		aMagnet.setPaint(Color.black);
		aMagnet.setOffset(100, 100);
		getCanvas().getLayer().addChild(aMagnet);

		magnetList.add(aMagnet);

		aMagnet.addInputEventListener(new PBasicInputEventHandler() {
			public void mouseDragged(PInputEvent aEvent) {
				Dimension2D delta = aEvent.getDeltaRelativeTo(aEvent
						.getPickedNode());
				Magnet magnet = (Magnet) aEvent.getPickedNode();
				magnet.hideToolTip();
				magnet.translate(delta.getWidth(), delta.getHeight());
				for (int i = 0; i < dustList.length; i++) {
					// Filtered Dusts are not affected by movements
					if (dustList[i].getFiltered())
						continue;

					for (int j = 0; j < magnetList.size(); j++) {
						Magnet m = (Magnet) magnetList.get(j);
						dustList[i].moveToward(m);
					}
				}

				aEvent.setHandled(true);
			}

			public void mouseEntered(PInputEvent aEvent) {
				Magnet magnet = (Magnet) aEvent.getPickedNode();
				magnet.showToolTip();
			}

			public void mouseExited(PInputEvent aEvent) {
				Magnet magnet = (Magnet) aEvent.getPickedNode();
				magnet.hideToolTip();
			}

			public void mousePressed(PInputEvent aEvent) {
				Magnet magnet = (Magnet) aEvent.getPickedNode();
				magnet.hideToolTip();
				controlWindow.selectMagnet(magnet.getMagnetName());
			}
		});

		controlWindow.refresh();

		return aMagnet;
	}