JTree usage/archetecture
From: don (dexter_at_uwm.edu)
Date: 10/19/04
- Next message: Tux: "TableExample but with the custom columns size ?"
- Previous message: Paul Lutus: "Re: just on Linux: grey rectangles instead of JFrame"
- Next in thread: Piet: "Re: JTree usage/archetecture"
- Reply: Piet: "Re: JTree usage/archetecture"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Oct 2004 10:40:09 -0700
Hello,
no doubt this problem has been solved multiple times, so it's likely
that for a kind expenditure of a few minutes of your time you could
save me oodles (technical term) of my time spent following the wrong
path(s)...
i'm looking to create a JSplitpane w/ a JTree on the left and a
custom, node-dependant editor on the right. user selects a node,
right pane gets filled with that node's editor...often a JComboBox,
perhaps something more extravagant.
i guess i'm looking for a clear answer as to what classes/interfaces i
need concern myself with (JTree, TreeModel, DefaultMutableTreeNode,
TreeCellEditor??) and what events/listeners are appropriate.
from the extensive amount of swing-provided tree-based archetecture,
i'm guessing there's a definite "right" way of doing this. i can
think of what is probably a "wrong" way by subclassing
DefaultMutableTreeNode to be something like TreeNodeWithEditor,
listining for selection events on the tree side, obtaining the editor
from the (re-cast) treenode, displaying it on the right side,
listining for a custom event on the editor then refressing the tree.
thoughts? good pointers to documented solutions? (i've read the "how
to use trees")
thanks muchly,
-don.
- Next message: Tux: "TableExample but with the custom columns size ?"
- Previous message: Paul Lutus: "Re: just on Linux: grey rectangles instead of JFrame"
- Next in thread: Piet: "Re: JTree usage/archetecture"
- Reply: Piet: "Re: JTree usage/archetecture"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|