I'm working on an application in Java that copies files from Destiantion folder to Source folder based on what type of files you need, and I got stuck.
Here is what is going on, when I run the application first I need to select Source folder and Destionation folder.
Now, imagine that in Source folder you have subfolders MUSIC, PICTURES, DOCUMENTS and in MUSIC folder you have subfolders divided by singers and in those folders you have songs (example AC/DC Thunderstruck).
I have JCheckBox where I choose whether I want MUSIC, DOCUMENTS or PICTURES, so if I check MUSIC then I want that al subfolders of MUSIC folder can be seen in Combobox list.
Then in ComboBox i choose folder that i need to copy(when I choose folder then I click on button and the folder is copied to Destination folder).
The thing where i got stuck is "I want that all subfolders of MUSIC folder can be seen in Combobox list". Question in general is: "How I can list folder/file names from Source folder (any source folder that has subfolders MUSIC, PICTURES nad DOCUMENTS) in ComboBox or Choice?"
I'm doing this for practice and learning and every time that i googled this problem i got explanations like this "fruitChoice.add("Apple");", but the thing is that i "don't know" what is in folder MUSIC and when i click on it in checkbox i need the list of subfolders in ComboBox or Choice. If you can give me some links that would be great too.
I hope that you understand what I'm aksing and I apologize for my bad english, it's not my native language.
Thanks in advance for your reply.