?
Solved

JFileChooser

Posted on 2004-04-19
3
Medium Priority
?
431 Views
Last Modified: 2008-02-01
There is a textfield that says "File name", and i want to know how to get to that file, since sometimes when i run it, it only displays the name and not the extension.


Thanks
0
Comment
Question by:DrunkenTigerDDD
3 Comments
 
LVL 9

Expert Comment

by:mmuruganandam
ID: 10857799
0
 
LVL 17

Accepted Solution

by:
krakatoa earned 100 total points
ID: 10858901
As far as I know the JFC will show you the full name of the files. Maybe you have got the extension display switched off on the OS, or the file in question just doesnt have an extension - ?
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 10859099
Correct. The File object returned will have the extension in the file-name. It might not be visible in the OS due to customized settings (in Windows, try Folder Options -> View -> Hide extensions for known filenames).
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month15 days, 18 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question