drawing a tree
I'm attempting to draw a tree. Here's my code for it:
publicvoid draw(Graphics2D g, Dimension d)
{
g.drawString(key.toString(), (int)d.getWidth()/2, d.height);// problem here?!?!?
int size = children.size();
for (int c = 0; c < size; ++c)
children.get(c).draw(g,new Dimension(d.width*c/size, d.height + 10));
}
But the problem is that setting the width in [ g.drawString(key.toString(), (int)d.getWidth()/2, d.height/2);] doesn't seem to have any affect. Everything is displayed as though that the x parameter is set to 0.

