Solved

JFileChooser

Posted on 2004-04-19
3
427 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 16

Accepted Solution

by:
krakatoa earned 50 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
servlet example 17 59
ejb example issues 3 55
Chrome and Firefox Java 5 69
Java basic valueOf question 1 35
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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 theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

730 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