The Java Tutorials' Weblog
Input Requested for How to Use Trees Page
I am updating the How to Use Trees page of the Components lesson. We would like to beef up the Creating a Data Model section, preferably, exploring more of the 'Genealogy model'. The existing example on Genealogy is contributed by one of the Tutorial readers. Here is a chance for you to contribute more to this topic.Also, we would like to include one more topic on 'How to implement a model that lazily loads children'. Any thoughts or suggestions?
- Jacob Royal
Posted at 12:52PM Jun 21, 2007 by The Java Tutorial Team | Comments[2]
Thursday Jun 21, 2007
Posted by Viswanath on June 24, 2007 at 10:35 AM PDT #
JTree made this extremely difficult because it did not want to let me assign actions to my node objects. I found a workaround, but the coding required was ugly (or maybe I just write ugly code).
Any help in such a specific requirement would be nice. ;-)
Oh, and clear explanations of the tree jargon would be WONDERFUL. It is not often clear what the difference is between a node, a child, a leaf, and the methods that count or traverse those.
While I'm at it, a clear and concise explanation of the tree model, and how to get to the data you want, is much to be desired. The idea that tree elements are simply treated as rows was NOT clear at all the first hundred times I read the old tutorial. This has great impact on knowing what I want to display.
Posted by Naruki on July 05, 2007 at 06:41 PM PDT #