How can I label the links of a JTree?

R

Ramon F Herrera

This is the kind of things that happens when you allow
somebodody else (the Java architects) to design your
data structures. No matter how much foresight the creator
has, the implementor always wishes for some extra feature.

I just got started with JTress and they are actually easier
than I expected, and they can actually be much more complex
if you decide to go beyond the defaults.

I need to label the arcs (aka, links) with my own squeme.
JTrees use 0,1,2,3, etc. while my application needs them to
begin at 1 at there may be gaps: 1,3,7,12, etc.

Somehow I feel that this kind of problem calls for subclassing
perhaps? Thereby making my trees a little bit more capable?

How about adding more fields to the nodes? How would I
go about that?

TIA,

-Ramon F. Herrera
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,271
Latest member
BuyAtenaLabsCBD

Latest Threads

Top