![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2006
Posts: 5
Rep Power: 0
![]() |
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: |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 139
Rep Power: 4
![]() |
use your file object (here its called fFile) to do this:
fFile = fc.getSelectedFile (); |
|
|
|
|
|
#3 |
|
Sexy Programmer
|
JFileChooser chooser = new JFileChooser(); chooser.showOpenDialog(); File file = chooser .getSelectedFile();
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Could this get me in trouble? (Reg. Internet Copyright Laws) | Sane | Coder's Corner Lounge | 14 | Jan 26th, 2006 6:14 PM |
| trouble with sessions | k4pil | PHP | 5 | Nov 10th, 2005 10:42 AM |
| Trouble with a swith statement | cjaime | C | 10 | Nov 8th, 2005 11:09 AM |
| ftell() giving me trouble. | 2roll4life7 | C | 5 | Sep 2nd, 2005 12:27 PM |
| Having trouble with an exercise in the C book. | linuxpimp20 | C | 6 | Jul 6th, 2005 7:22 AM |