Skip to main content

JFileChooser how to get multiple 'Files of type:' on Windows

2 replies [Last post]
swpalmer
Offline
Joined: 2003-06-10

On Windows a file requester has a "Files of type:" combobox that can be used to select the desired file filter. JFileChooser on Windows shows this same control, but...

With JFileChooser it seems you can only set a single file filter. Is there any way to get the same behavior, so the "files of type:" combobox in the JFileChooser has more than one option and it effectively adjusts the filter being used?

It seems that JFileChooser doesn't match the Windows 'Feel' in this area.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
swpalmer
Offline
Joined: 2003-06-10

Thanks, how did I miss that? dohhhh!

mthornton
Offline
Joined: 2003-06-10

Call JFileChooser.addChoosableFileFilter for each extra filter you want to add.