public static void addNode(Node n){
		nodes.addNode(n);
		Global.customGlobal.nodeAddedEvent(n);
		if(Global.isGuiMode){
			try {
				GraphPanel gp = Main.getGuiRuntime().getGUI().getGraphPanel();
				if(gp != null){
					//force the graph panel to redraw on next paint (do not call paintNow, because this draws the panel once more
					gp.forceDrawInNextPaint();
				}
			} catch (NotInGUIModeException e) {
				Main.fatalError(e);
			}
		}
	}