用jgraph做一个类似类的层次图的,我现在是问题是父节点画出来了,子节点是动态加的,如何写语句,让子节点不重颠,贴一段我的代码DefaultGraphCell subfun;
while (results.hasNext()) {
        QuerySolution soln = results.nextSolution(); //查询结果中的每一条(称之为满足条件的一个solution)
        String s = soln.get("x").toString();
        StringTokenizer token = new StringTokenizer(s,"#");
         token.nextToken();
        //System.out.println(token.nextToken());

subfun=new DefaultGraphCell(token.nextToken());


Map subAttrib=new Hashtable();
attributes.put(subfun, subAttrib);

Rectangle2D subBounds = null;
subBounds=new Rectangle2D.Double(140,140,80,20);
GraphConstants.setBounds( subAttrib, subBounds);

GraphConstants.setBackground(subAttrib, Color.orange);
GraphConstants.setOpaque(subAttrib, true);

GraphConstants.setBorder(subAttrib, BorderFactory.createRaisedBevelBorder());

DefaultPort wp=new DefaultPort();
subfun.add(wp);

DefaultEdge edge=new DefaultEdge();
Map edgeAttrib=new Hashtable();
attributes.put(edge, edgeAttrib);

int arrow=GraphConstants.ARROW_CLASSIC;
GraphConstants.setLineEnd(edgeAttrib, arrow);
GraphConstants.setEndFill(edgeAttrib, true);

ConnectionSet cs=new ConnectionSet(edge,hp,wp);
Object[] cells=new Object[]{edge,fun,subfun};

gmodel.insert(cells, attributes, cs, null, null);
}主要是黄色那部分代码怎么改,谢谢了