I have to build a JTree node with 2 JCheckBoxes amd 1 JTextField. I have implemented my TreeCellRenderer class which extends DefaultTreeCellRenderer and able to display the node by adding the three components (JCkeckBox and JTextField) in a JPanel. JTree is implementing Mouse Listener. CheckBoxes are fine,but, I am not able to edit the JTextField. To find out which Checkbox is clicked, I am using getX(). Is there a better way to do it?