protected void saveTransformedData(Instances ti){
  JFileChooser fc;
  int retVal;
  BufferedWriter writer;
  ExtensionFileFilter filter;
  fc=new JFileChooser();
  filter=new ExtensionFileFilter(".arff","ARFF data files");
  fc.setFileFilter(filter);
  retVal=fc.showSaveDialog(this);
  if (retVal == JFileChooser.APPROVE_OPTION) {
    try {
      writer=new BufferedWriter(new FileWriter(fc.getSelectedFile()));
      writer.write(ti.toString());
      writer.flush();
      writer.close();
    }
 catch (    Exception e) {
      e.printStackTrace();
      m_Log.logMessage("Problem saving data: " + e.getMessage());
      JOptionPane.showMessageDialog(this,"Problem saving data:\n" + e.getMessage(),"Error",JOptionPane.ERROR_MESSAGE);
    }
  }
}

protected void saveTransformedData ( Instances ti ) { JFileChooser fc ; int retVal ; BufferedWriter writer ; ExtensionFileFilter filter ; fc = new JFileChooser ( ) ; filter = new ExtensionFileFilter ( ".arff" , "ARFF data files" ) ; fc . setFileFilter ( filter ) ; retVal = fc . showSaveDialog ( this ) ; if ( retVal == JFileChooser . APPROVE_OPTION ) { try { writer = new BufferedWriter ( new FileWriter ( fc . getSelectedFile ( ) ) ) ; writer . write ( ti . toString ( ) ) ; writer . flush ( ) ; writer . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; m_Log . logMessage ( "Problem saving data: " + e . getMessage ( ) ) ; JOptionPane . showMessageDialog ( this , "Problem saving data:\n" + e . getMessage ( ) , "Error" , JOptionPane . ERROR_MESSAGE ) ; } } }
popup a savedialog for saving the transformed data
