This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 15299

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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: How to access drive
Similar Threads
applying CSS to input type="file"
Browse Button Value
how to browse only folder
Uploading from a web page
JFileChooser and network drives