posted 17 years ago
Hi,
I want to make a JTree with checkboxes. The checkbox selection should be independent of the node selection. i.e. if I click on the node's text part it should be highlighted but the check box should not be ticked/unticked. Ticking/unticking the checkbox should not highlight the node's text part.
Actually when the GUI comes up for the first time i read the file system of a system and displays only the first level, say only the C: drive and its folders in the left pane as tree and on right side pane the files present in C drive in a tabular structure.
Now when i click on the node's text part, node should be highlited and it should fetch the content of the folder and add the subfolders to it and so on. This means I am adding the child nodes on user click.
May be I can have a FolderUserObject which can save the tick/untick as a boolean variable, as i need this at later part.
Please provide me some good sample code soon.
Its very urgent.
Thanks in advance.