posted 24 years ago
Hello,
Can somebody explain to me, or point me towards an example of a JTree that will dynamically change individual nodes based on criteria from a different component, such as a Resultset? For example, if you wanted each individual node icon to be set according to it's status in the database - if it's "available" it would have a green icon, if it's "not-available" it would have a red icon.
I know that the TreeCellRenderer is used to do this, but as far as I can tell, it only allows one to change parts of the tree according to criteria/parameters specific to the JTree itself like, "selected", "leaf", "parent", "expanded". Is it possible to change parts of the JTree with parameters from different components?
Regards,
Craig Snowbarger