One is to display treelike data nicely on a screen, the other to transform your input into such data. You should solve these independently.
See this post on Stackoverflow regarding tree drawing and Tk::TreeGraph for ideas on how to nicely design an interface for your graph drawer.
holli
You can lead your users to water, but alas, you cannot drown them.