example/tutorial for using TreeModel+AbstractTreeModel?

Jason S picture Jason S · Jul 31, 2009 · Viewed 7k times · Source

I have a database containing a hierarchy that I want to display within a JTree.

Is there a good example/tutorial for TreeModel and/or AbstractTreeModel that explains how to implement a custom treemodel? I'm going through a lot of head-scratching and can't seem to find some code out there which is a good starting point.

edit: I did find this and this but they have no helpful comments so I'm not sure what the Firexxx methods are doing and when they get called or when I have to call them.

Answer

akf picture akf · Jul 31, 2009

Here is a tutorial that might help.

edit: There is a simple O'Reilly example here. And this Oracle tutorial as well.