1

Possible Duplicate:
adjust selected File to FileFilter in a JFileChooser

I have a JFileChooser with a FileFilter (txt, doc, odt) and I want to save an existing file.

So I open the file chooser GUI and enter the name for the file to save (e.g. test.doc). After this, I change the file type from the dropdown list to see only e.g. .txt files.

At this time, the file-extension from test.doc should change to test.txt, but how to do it? I cannot add an ActionListener to the file filter.

Community
  • 1
  • 1
Pete
  • 41
  • 1
  • 2
  • 1
    When you say, "cannot add an `ActionListener` to the file filter," do you mean that you don't know how or that you are not permitted to do so? – trashgod Aug 19 '11 at 10:28
  • Now I know what to do... - edit method accept from filefilter. Thats it – Pete Aug 22 '11 at 09:23

0 Answers0