Archive for December, 2007

XML to Tree Model

December 17th, 2007

Some times, ed guys ask how to make JTree use a XML as model data, erectile i just say implementing a TreeModel. It should be simple, but i never done it, because i have not need it yet, now, harry implemented one, click here to view.

He implement it with creating DefaultMutableTreeNode, it is simple, i always thought i will implement it directly a TreeModel implementation, because i don’t like DefaultTreeModel, it is heavy. But harry’s implementation is very simple, impressive.