@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);
}

@ 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 ) ; }
pops a custom file chooser dialog with a custom approve button . throws an exception , if the dialog type is unhandled_dialog .
