protected void export(){
  int retVal;
  File file;
  AbstractFileSaver saver;
  if (m_FileChooser == null)   m_FileChooser=GUIHelper.newConverterFileChooser();
  retVal=m_FileChooser.showSaveDialog(this);
  if (retVal != ConverterFileChooser.APPROVE_OPTION)   return;
  file=m_FileChooser.getSelectedFile();
  saver=m_FileChooser.getSaver();
  try {
    saver.setInstances(m_DataPanel.getInstances());
    saver.writeBatch();
  }
 catch (  Exception e) {
    JOptionPane.showMessageDialog(this,"Failed to save dataset to '" + file + "':\n"+ Utils.throwableToString(e),"Error saving",JOptionPane.ERROR_MESSAGE);
  }
}

protected void export ( ) { int retVal ; File file ; AbstractFileSaver saver ; if ( m_FileChooser == null ) m_FileChooser = GUIHelper . newConverterFileChooser ( ) ; retVal = m_FileChooser . showSaveDialog ( this ) ; if ( retVal != ConverterFileChooser . APPROVE_OPTION ) return ; file = m_FileChooser . getSelectedFile ( ) ; saver = m_FileChooser . getSaver ( ) ; try { saver . setInstances ( m_DataPanel . getInstances ( ) ) ; saver . writeBatch ( ) ; } catch ( Exception e ) { JOptionPane . showMessageDialog ( this , "Failed to save dataset to '" + file + "':\n" + Utils . throwableToString ( e ) , "Error saving" , JOptionPane . ERROR_MESSAGE ) ; } }
exports the data to a file .
