System.out.println("Scale: "+scale+" paddedWidth: "+paddedNodeWidth+ " nodeHeight: "+nodeHeight+"\nmaxX: "+maxX+" maxY: "+ maxY+" final: "+(int)((maxX+paddedNodeWidth+2)*scale)+ ","+(int)((maxY+nodeHeight+2)*scale) ); m_gp.setPreferredSize(new Dimension((int)((maxX+paddedNodeWidth+2)*scale), (int)((maxY+nodeHeight+2)*scale)));  }
    protected void setAppropriateSize() {	int maxX=0, maxY=0;	for(int i=0; i<m_nodes.size(); i++) {	    GraphNode n = (GraphNode)m_nodes.elementAt(i);	    if(maxX<n.x)		maxX=n.x;	    if(maxY<n.y)		maxY=n.y;	}	//System.out.println("Scale: "+scale+" paddedWidth: "+paddedNodeWidth+" nodeHeight: "+nodeHeight+	//		   "\nmaxX: "+maxX+" maxY: "+maxY+" final: "+(int)((maxX+paddedNodeWidth+2)*scale)+","+	//		   (int)((maxY+nodeHeight+2)*scale) );	m_gp.setPreferredSize(new Dimension((int)((maxX+paddedNodeWidth+2)*scale), 					    (int)((maxY+nodeHeight+2)*scale)));	//System.out.println("Size set to "+this.getPreferredSize());    }