3

By using JFileChooser I am able to select file and folders getting JList with File Objects and I am showing it with checkbox. Now my requirement is like I want to show the selected file and folder in tree structure with checkbox and the checkbox should be only for root elements not for all child elements.

Example : For Example, I selected folders ABC and PQR which containt sub folders and few files now on UI It should be display

Checkbox1 ABC--
          --SubFolders
          .           --SubFolder
          .                      --Files
          --Files
Checkbox2 PQR--
          --SubFolders
          .           --SubFolder
          .                      --Files
          --Files
jzd
  • 23,473
  • 9
  • 54
  • 76
anand
  • 31
  • 2
  • 1
    Please ask a specific question, also please don't say your problem is urgent. – jzd Apr 12 '11 at 15:14

1 Answers1

0

Sounds a bit complicated... as far as the tree goes, there's an online post of code from the OReilly Java Cookbook that might help you:

http://java.codefetch.com/cache?url=http://examples.oreilly.com/javacook2/javacooksrc2.jar&path=gui/FileTree.java&lang=java&qy=jtree+file

Jason S
  • 184,598
  • 164
  • 608
  • 970