if(min>1) nodesLevel[i]=min-1;
if(min!=65536 && min>1) nodesLevel[i]=min-1;
    protected void makeProperHierarchy() {	processGraph();	m_progress.setValue(1);	m_progress.setString("Removing Cycles");	//****removing cycles	removeCycles();		m_progress.setValue(2);	m_progress.setString("Assigning levels to nodes");	//****Assigning vertical level to each node	int nodesLevel[] = new int[m_nodes.size()];	int depth=0; 	for(int i=0; i<graphMatrix.length; i++) {	    assignLevels(nodesLevel, depth, i, 0);	}	for(int i=0; i<nodesLevel.length; i++) {	    if(nodesLevel[i]==0) {		int min=65536;		for(int j=0; j<graphMatrix[i].length; j++) {		    if(graphMatrix[i][j]==DIRECTED) 			if(min>nodesLevel[j])			    min = nodesLevel[j];		}		if(min>1)		    nodesLevel[i]=min-1;	   }	}		//System.out.println("");        int maxLevel=0;	for(int i=0; i<nodesLevel.length; i++) {	    if(nodesLevel[i]>maxLevel)		maxLevel = nodesLevel[i];	    //System.out.println(((GraphNode)m_nodes.elementAt(i)).ID+" "+i+">"+nodesLevel[i]);	}	int levelCounts[] = new int[maxLevel+1];		for(int i=0; i<nodesLevel.length; i++) {	    levelCounts[nodesLevel[i]]++;	}	//****Assigning nodes to each level	int levelsCounter[] = new int[maxLevel+1];	nodeLevels = new int[maxLevel+1][];	for(byte i=0; i<nodesLevel.length; i++) {	    if(nodeLevels[nodesLevel[i]]==null)		nodeLevels[nodesLevel[i]] = new int[ levelCounts[nodesLevel[i]] ];	    //nodeLevels[nodesLevel[i]].addElement(new Integer(i));	    nodeLevels[nodesLevel[i]][levelsCounter[nodesLevel[i]]++] = i;	}	m_progress.setValue(3);	m_progress.setString("Removing gaps by adding dummy vertices");	//****Making a proper Hierarchy by putting in dummy vertices to close all gaps	if(m_jCbEdgeConcentration.isSelected()) 	    removeGapsWithEdgeConcentration(nodesLevel);	else	    removeGaps(nodesLevel);	    	//After assigning levels and adding dummy vertices	//System.out.print("\n\t");	//for(int i=0; i<graphMatrix.length; i++) 	//    System.out.print(((GraphNode)m_nodes.elementAt(i)).ID+" ");	//System.out.println("");	//for(int i=0; i<graphMatrix.length; i++) {	//    System.out.print(((GraphNode)m_nodes.elementAt(i)).ID+"\t");	//    for(int j=0; j<graphMatrix[i].length; j++)	//	System.out.print(graphMatrix[i][j]+" ");	//    System.out.println("");	//}		//****Updating edges[][] array of nodes from	//****the interconnection matrix, which will be used	//****by the Visualizer class to draw edges	for(int i=0; i<graphMatrix.length; i++) {	    GraphNode n = (GraphNode)m_nodes.elementAt(i);	    int sum=0;	    for(int j=0; j<graphMatrix[i].length; j++)		if(graphMatrix[i][j]!=0)		    sum++;	    if(sum!=0) {		n.edges = new int[sum][2];	    	for(int j=0, k=0; j<graphMatrix[i].length; j++)	    	    if(graphMatrix[i][j]!=0) {	    		n.edges[k][0] = j;	    		n.edges[k][1] = graphMatrix[i][j]; k++;	    	    }	    }	    //n.edges = graphMatrix[i];	}	//Interconnection matrices at each level, 1 to n-1	//printMatrices(nodeLevels);    }