A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Swing / AWT / SWT
Author
How to access drive
arun mahajan
Ranch Hand
Joined: Dec 07, 2001
Posts: 304
posted
Feb 11, 2002 17:42:00
0
Hi,
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?
Arun
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
I like...
posted
Feb 12, 2002 08:34:00
0
Take a look at the
JFileChooser
class.
Alex Ku
Ranch Hand
Joined: Jan 15, 2002
Posts: 47
posted
Feb 12, 2002 12:59:00
0
listRoots will list all the drives, including network drives
File [] roots = File.listRoots(); for(int i = 0; i < roots.length; i++) System.out.println(roots[i]);
How you want to display in your GUI is up to you then.
Kawaii
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: How to access drive
Similar Threads
JFileChooser and network drives
applying CSS to input type="file"
Browse Button Value
Uploading from a web page
how to browse only folder
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter