JFileChooser Filter

Is there a way in JFileChooser filters to instanitate two classes like

setFileFilter(new FXLSFilter())

setFileFilter(new WODFilter())

and have them be filtered at the same time without having to selecting it? And only, for example a .xls file and .word file will show when no options are clicked or only one option is clicked?

[351 byte] By [blackmagea] at [2007-11-27 6:54:09]
# 1
Sure have you read the JFileChooser API. Look for all the method with "FileFilter" in the method name.
camickra at 2007-7-12 18:29:02 > top of Java-index,Desktop,Core GUI APIs...
# 2
Yea I did and it says nothing about adding taking two different objects and making them filter together.
blackmagea at 2007-7-12 18:29:02 > top of Java-index,Desktop,Core GUI APIs...
# 3
> Yea I did and it says nothing about adding taking two different objects and > making them filter together.the method name starts with 'add...'
Michael_Dunna at 2007-7-12 18:29:02 > top of Java-index,Desktop,Core GUI APIs...
# 4
addChooseabelFileFilter?Doesnt work.I don't think u guys get it. I have a filefilter, and it works perfectly when I selected mutlipe files in a directoy. But the problem comes when I load a whole directoy, it no longer filters the files.
blackmagea at 2007-7-12 18:29:02 > top of Java-index,Desktop,Core GUI APIs...
# 5
> Doesnt work.works for those who know how to write a fileFilter.
Michael_Dunna at 2007-7-12 18:29:02 > top of Java-index,Desktop,Core GUI APIs...
# 6

> I don't think u guys get it.

You are correct, I don't get it.

The API has examples of how to write a FileFilter.

The API has a link to the Swing tutorial on "How to Use a File Chooser", which also has examples.

The forum has examples of how to write a FileFilter that you could search for.

Yet the code you wrote doesn't work and we are supposed to make a wild guess what you are doing wrong?

For the 4th time, where is your SSCCE? You' ve been given links in a least two other postings that explains what a SSCCE is.

camickra at 2007-7-12 18:29:02 > top of Java-index,Desktop,Core GUI APIs...