question: @ Override public int showDialog ( Component parent , String approveButtonText ) { if ( m_DialogType == UNHANDLED_DIALOG ) throw new IllegalStateException ( "Either use showOpenDialog or showSaveDialog!" ) ; else return super . showDialog ( parent , approveButtonText ) ; }
target:  Pops a custom file chooser dialog with a custom approve button. Throws an exception, if the dialog type is UNHANDLED_DIALOG.