Hi, I want to implement displaying the Dir/File struture in tree. The nodes contains child nodes i.e subdirectories/files. Only when the user selects the nodes i will retrieve the subdir/files and i will add to the selected node. How could i do this, below i have explained my problem.
Could any one tell me how to implement this. For example. * dir1 * subdir1 file1-dir1 * dir2 file2-dir2 *dir 3 file3-dir3 This is when expanded mode. * dir1 * dir2 * dir3 This is when collapsed mode When adding the leaf to the parent nodes the * (here for display purposes) will be painted indicating that the node contains leaf nodes bcos it has child nodes and hence automatically the * appears in front of the parent node. For take the above example. if there were no leaf nodes under the parent nodes the jtree would be like this dir1 dir2 dir3 But i would like to display * dir1 * dir2 * dir3 initially like this and then later i would display the files/directories when the user selects the particular node. This is normal display of tree. and there are subdirectories in dir1. I will have only dir1,dir2,dir3 Advance thanks, regards ravi _______________________________________________ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing