Hi, I have created a JTree of objects and would like each node to be labelled with the objects name rather than the object identifier which is what I currently get. I have called the objects name into a string and thought I could just give this to the Jtree to use but this doesn't seem to be the case. Anyone know why?
posted 12 years ago
Amy, I think if you write your own toString() method for the Requirement class and have it return the value of name you'll get the behavior you seek. Thanks, Joe