I am using a JTree component and I have my own custom TreeCellRenderer:
public class MyTreeCellRenderer extends Object implements TreeCellRenderer
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean selected, boolean expanded,
boolean leaf, int row, boolean hasFocus)
private JCheckBox m_node = new JCheckBox();
Whenever I click on a node in the tree, I want to be able to get the JCheckBox object (which is the node that was clicked), so that I can set it to be selected or not selected. How can I do this?