I want to be able to add check boxes beside every node in my JTree. I think it would work if i customized my FileTreeCellRenderer class i just dont know where to start. here's my FileTreeCellRenderer class.

XML Code:
<code>
class FileTreeCellRenderer extends DefaultTreeCellRenderer 
   {
     private FileSystemView fileSystemView;
     private JLabel label;
     private JCheckBox check;
     
     

      FileTreeCellRenderer() 
       {
        label=new JLabel();
        label.setOpaque(true);
        fileSystemView=FileSystemView.getFileSystemView();
       }
     
      public Component getTreeCellRendererComponent(JTree tree,Object value,boolean selected,boolean expanded,boolean leaf,int row,boolean hasFocus) 
        {

          DefaultMutableTreeNode node=(DefaultMutableTreeNode)value;
          
          if(!"**".equals(node.toString()))
            {
        	File file=(File)node.getUserObject();
        	label.setIcon(fileSystemView.getSystemIcon(file));
                label.setText(fileSystemView.getSystemDisplayName(file));
                

               if (selected) 
                 {
                   label.setBackground(backgroundSelectionColor);
                 } 
               else 
                 {
                   label.setBackground(backgroundNonSelectionColor);
                 }
            }
        return label;
      }

   
  }

</code>