This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, There, I need to recursively call SQL to retrieve data which have inhert relationships. Then display the data into JTree. I don't need the tree to be balanced or ordered, but definitely not binary. And the JTree need to be manipulated a lot while keeping the hierarchy of the tree. Does anyone have recommendation on what Data Structure I should use to store the data returned from Database? Or should I just write my own tree structure? Thanks a lot!! Nina
From the sound of it you will probably be best off creating your own model behind this data - especially if you are loading it dyanmically, then make a TreeModel interface to your model that can make sense of it for the JTree. -Brian
Joined: Jun 26, 2002
Thanks, Brian! I am not planning to load it dynamicly, because the data would possibly be huge. I feel it would be better to let the GUI user wait at the very beginning instead of waiting for every click. How do you think? Also do you think it would be better for the performance if I use XML to store the recursively SQL result then java data structure? Thank! Nina