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 )....
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL