question: @ Override public int showOpenDialog ( Component parent ) { File selFile ; int result ; m_DialogType = OPEN_DIALOG ; initGUI ( OPEN_DIALOG ) ; result = super . showOpenDialog ( parent ) ; m_DialogType = UNHANDLED_DIALOG ; removePropertyChangeListener ( m_Listener ) ; selFile = getSelectedFile ( ) ; if ( ( result == APPROVE_OPTION ) && ( getFileMustExist ( ) ) && ( selFile == null ) ) { result = showOpenDialog ( parent ) ; } else if ( ( result == APPROVE_OPTION ) && ( getFileMustExist ( ) ) && ( selFile != null ) && ( selFile . isFile ( ) ) && ( ! selFile . exists ( ) ) ) { int retVal = JOptionPane . showConfirmDialog ( parent , "The file '" + selFile + "' does not exist - please select again!" ) ; if ( retVal == JOptionPane . OK_OPTION ) result = showOpenDialog ( parent ) ; else result = CANCEL_OPTION ; } if ( result == APPROVE_OPTION ) { if ( getFileFilter ( ) instanceof ExtensionFileFilter ) m_LastFilter = ( ExtensionFileFilter ) getFileFilter ( ) ; else m_LastFilter = null ; if ( getSelectedFile ( ) != null ) configureCurrentHandlerHook ( OPEN_DIALOG ) ; } return result ; }
target:  Pops up an "Open File" file chooser dialog.