I'm trying to write a little program where i have a listbox and a tree. Now that aint really the problem, but i want to be able to select a harddisk form my listbox and then make the tree of the disk.
But the problem is that i don't know how i can get my harddisks in that listbox
Can anyone help me?
what do you mean by i don't know how i can get the harddisks....?
in the File class, there is a method which returns an array of all the drives in your computer. it's listRoots(). check on the File class documentation to be sure i gave you the right method name. this should solve your problem, but then another problem arises - JAVA DOESN'T KNOW HOW TO IDENTIFY DRIVE TYPES. i started a thread about this on how to identify drive types ( thread in this forum is - drive types )....
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center