ADC Home > Reference Library > Technical Q&As > Java > User Experience >
Not Recommended Document
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:
Technical Q&A QA1280
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]
|