Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to copy one tree model to another tree model in JTree? (Using Clone or special method)  RSS feed

 
Leel larson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created two Java trees. Now I want to assign second JTree to first JTree for my further process. How can I do it?
Clone a java TreeModel or are there any special method to do that?
I used ,

firstTree.setModel(secondTree.getModel());

But not successful.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!