Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   JFileChooser trouble (http://www.programmingforums.org/showthread.php?t=11533)

deviantstefan Oct 9th, 2006 3:34 PM

JFileChooser trouble
 
hi,can someone please show me a simple pice of code to get the (String) name of the file selected by JFileChooser?
thkx,bye:banana:

paulchwd Oct 10th, 2006 11:46 AM

use your file object (here its called fFile) to do this:

fFile = fc.getSelectedFile ();

ReggaetonKing Oct 10th, 2006 12:23 PM

:

JFileChooser chooser = new JFileChooser();
chooser.showOpenDialog();
File file = chooser .getSelectedFile();



All times are GMT -5. The time now is 1:10 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC