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, i have got a JScrollPane containing a JTree (i hardcoded a root node and it give me the children) and I'd like to select some leafs(xml files) in my Tree and add these files as leafs of another JTree (in another JScrollPane). I'm using buttons to do this ... So i'd like to select some leaf in my first JTree and these leafs being added to the other JTree when i press on the button I've tried by myself (of course) and will continue but some help could be interesting thx
Do you have a TreeModel? This would be the easiest way. Then you can easily detect all children of your selected tree and you deal only with data. It doesn't matter what kind of component is behind. Maybe you can tell us a bit more in detail, what you already have. Maybe you give us a bit code. But pleas not the whole stuff, only the minimum.