Solved

JFileChooser

Posted on 2004-04-19
3
422 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:mayankeagle
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now