Results 1 to 5 of 5
- 04-13-2011, 02:28 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 5
- Rep Power
- 0
Swing, How to Show The Selected Files and Folder In Tree Structure with CheckBox
Dear all,
By using JFileChoor 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. Please help me as soon as possible, for me its very urgent.
Example : For Example, I selected folders ABC and PQR which containt sub folders and few files
now on UI It should be display like :
Checkbox1 ABC--
--SubFolders
. --SubFolder
. --Files
--Files
Checkbox2 PQR--
--SubFolders
. --SubFolder
. --Files
--Files
Regards,
Anand
- 04-13-2011, 02:44 AM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,604
- Rep Power
- 5
a) See How to Use Trees (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
b) Urgency is all relative. Mentioning your thread is urgent is disrespectful to others on the forum, who all have their own 'urgencies' and priorities.its very urgent
- 04-13-2011, 02:52 AM #3
Member
- Join Date
- Apr 2011
- Posts
- 5
- Rep Power
- 0
Hi doWhile,
Thanks for quick reply. I am able to create the normal tree structure. But problem is I am not able to create it by using checkbox with Root Element only :(
Could you please help me for the same.
Like if I selected folders ABC and PQR and file XYZ 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
chechbox3 XYZ
Regards,
Anand
- 04-13-2011, 03:10 AM #4
Member
- Join Date
- Apr 2011
- Posts
- 5
- Rep Power
- 0
I am Apologized for mentioning the Urgency.I dont want to hurt anybody. I am sorry for this unconscious behavior. I will try to improve myself for the same.
Regards,
Anand
- 04-13-2011, 03:35 AM #5
Member
- Join Date
- Apr 2011
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
Tree Structure
By chiku in forum New To JavaReplies: 2Last Post: 01-27-2011, 08:31 PM -
standart tree structure?
By willemien in forum New To JavaReplies: 3Last Post: 05-06-2010, 07:56 PM -
How to retain the checkbox selected after page load...?
By prabhurangan in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 07-24-2008, 08:13 AM -
How to print selected items in a SWT tree
By Java Tip in forum SWTReplies: 0Last Post: 07-07-2008, 04:55 PM -
Show Text Fields on combo Box selected value
By smajidali26 in forum AWT / SwingReplies: 0Last Post: 11-29-2007, 09:28 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks