ADC Home > Reference Library > Technical Q&As > Java > User Experience >

Not Recommended Documentclose button

Important: The information in this document is Not Recommended and should not be used for new development.

Current information on this Reference Library topic can be found here:

Exception in JFileChooser.setAcceptAllFileFilterUsed


Q: After installing the Java 1.4.1 Update 1 on Mac OS X 10.2, my application throws an ArrayIndexOutOfBoundsException whenever I call JFileChooser.setAcceptAllFileFilterUsed . What's the problem?

A: This is a known problem that emerged with 1.4.1 Update 1 for Jaguar systems. The problem occurs when a JFileChooser has already received calls to addChoosableFileFilter or setFileFilter . If the call to setAcceptAllFileFilterUsed is made before any other state management is done on the JFileChooser , the problem can be avoided. This workaround should be manageable in any circumstance.

Some applications reuse a single JFileChooser that may have setAcceptAllFileFilterUsed called on the fly, based on changing runtime conditions. In such a case, you would need to construct a separate JFileChooser for each "Accept All" or "Don't Accept All" scenario to sufficiently work around this problem.


[Oct 07, 2003]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.