question: private SmartFileView constructFileChooserView ( ) { JFileChooser chooser = null ; for ( int i = 0 ; i < 10 ; i ++ ) { try { chooser = new JFileChooser ( ) { { FileChooserUI ui = ( FileChooserUI ) ResourceManager . getNativeUI ( this ) ; setUI ( ui ) ; setFileView ( ui . getFileView ( this ) ) ; } } ; } catch ( NullPointerException ignored ) { } catch ( ArrayIndexOutOfBoundsException ignored ) { } if ( chooser != null ) break ; } if ( chooser == null ) { return null ; } else { return new SmartChooserView ( chooser . getFileView ( ) ) ; } }
target:  Constructs a JFileChooser-based FileView. This doesn't work consistently on Java 1.5.0_10 on Windows, because it deadlocks if called outside of the Swing thread.