-2

I have two working JTrees and i can edit/delete/add nodes by drag and drop from one tree to another. But one of my trees has two nodes with same name. Irrelevant to which of the two nodes I select, the deletion always delete the first node based on the name. I cant give numbers since nested nodes have complexity on defining it.

How to solve this issue?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433

1 Answers1

0

I think it uses equals() method of the objects. Try to override the method to provide the difference between nodes with the same name.

StanislavL
  • 56,971
  • 9
  • 68
  • 98