Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Common Dialog on Java?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can I use a common dialog to browse through the files/folders that are on my drives and then allow me to select one of them?
 
1. use the JFileChooser with the methods '.showOpenDialog(parent);' or '.showSaveDialog(parent);' then you have to receive the return int. Once it is good you can goto a file method and write the little bit of code to read/write to/from the file. It is actually quite simple. Or otherwise create your own, that would need a JDialog with methods to find the system root/s recognize files/dirs, decide what structure you want (listings, trees, simple text). You can get quite wild with it.

tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top