I need to be able to save files in .txt format using JFileChooser. For this I have used the following filter:
This works as long as the user types the file name along with extn while saving(like ex.txt), but when only name is typed(like ex) and the file type is chosen as txt, the file is not saved. Can someone please tell me whr am going wrong?
I have already done that and its still not working. Moreover, we need an instance of File as an argument for FileWriter - just appending .txt to the name is not helping. [ May 03, 2007: Message edited by: thejaswini ramesh ]