I have a method in my application called "Save as" which Saves the image of my application on computer my into a file. I used the JFileChooser to let the users choose their desired location for saving the file. The problem is unless user explicitly types in the file format, it saves the file with no extension.

and, how can i get extension from the File Type drop menu for saving my image file.


i only know how to associate FileFilter to JFileChooser.
and, this will show the Extension in File Type drop down Menu.

but how to retrieve or use selected Extension form this File Type Drop Menu.. into a String variable for future use??????