File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes How to access drive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to access drive" Watch "How to access drive" New topic

How to access drive

arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
I want to provide a browse button by clicking on it will go to the drive letter. What i mean when it click the button say "Browse" this will show a box which will have all drives letter of that computer.
Can you help me in this regard?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Take a look at the JFileChooser class.

GenRocket - Experts at Building Test Data
Alex Ku
Ranch Hand

Joined: Jan 15, 2002
Posts: 47
listRoots will list all the drives, including network drives

How you want to display in your GUI is up to you then.
I agree. Here's the link:
subject: How to access drive
It's not a secret anymore!