public void getGridGraph(mxAnalysisGraph aGraph, int numColumns, int numRows)
	{
		if (numColumns < 0 || numRows < 0)
		{
			throw new IllegalArgumentException();
		}

		mxGraph graph = aGraph.getGraph();
		Object parent = graph.getDefaultParent();
		int numVertices = numColumns * numRows;
		Object[] vertices = new Object[numVertices];
		
		for (int i = 0; i < numVertices; i++)
		{
			vertices[i] = graph.insertVertex(parent, null, new Integer(i).toString(), 0, 0, 25, 25);
		}

		int vertexCount = 0;

		for (int j = 0; j < numRows; j++)
		{
			for (int i = 0; i < numColumns; i++)
			{
				Object currVertex = vertices[vertexCount];

				if (i > 0)
				{
					// connect with previous x
					graph.insertEdge(parent, null, getNewEdgeValue(aGraph), vertices[vertexCount - 1], currVertex);
				}

				if (j > 0)
				{
					//connect with previous y
					graph.insertEdge(parent, null, getNewEdgeValue(aGraph), vertices[vertexCount - numColumns], currVertex);
				}

				vertexCount++;
			}
		}
	};