?
Solved

showSaveDialog file extensions

Posted on 2007-03-24
3
Medium Priority
?
1,143 Views
Last Modified: 2008-01-09
Hi,

I`m using a pretty bog standard jFileChooser.showSaveDialog() method to save files from the "text editor" I am developing as a project.  What I am looking to add to this jFileChooser.showSaveDialog is certain file extensions in the drop down box.

I've had a look on the iNet & EE but could not come across anything, can someone point me in the right direction please ?
0
Comment
Question by:Vel Eous
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 total points
ID: 18784835
You need a FilenameExtensionFilter. Example in API docs:

http://java.sun.com/javase/6/docs/api/javax/swing/JFileChooser.html
0
 
LVL 14

Author Comment

by:Vel Eous
ID: 18784841
Cheers dude.

Life save !!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 18784843
:-)
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

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

801 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