DialogComponentFileChooser no selected file

Hi All,

As I see the DialogComponentFileChooser is not final, so it is possible to override the validateSettingsBeforeSave() method. It is still possible with this solution to accept empty String there (with a red warning sign; swallowing the exception). This works fine till there is no previously selected file in that field. After that in the next configuration attempt when I try to delete the whole content (selecting all, then [del]) it seems to be no change in the model. What else should I override to be able to accept no file selection?
Thanks in advance, gabor

PS.: Actually it would be useful if the valid extensions could be groupable (like: [.txt|.TXT|.xml|.html], [.csv|.CSV], [] would be three groups with cardinalities: 4, 2, 1).

Extensions in DialogComponentFileChooser can be grouped already using a single string with the extensions separed by pipe; e.g.

new DialogComponentFileChooser(
…, JFileChooser.OPEN_DIALOG, “.csv”,".txt|.htm|.html",".*")

Thanks. Sorry, I missed that in Javadoc. Cool. :slight_smile: