Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to access drive

 
arun mahajan
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the JFileChooser class.
 
Alex Ku
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
listRoots will list all the drives, including network drives

How you want to display in your GUI is up to you then.
Kawaii
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic