} else if (m_ResultsDestinationCBox.getSelectedItem() == DEST_ARFF_TEXT) { InstancesResultListener irl = new InstancesResultListener(); irl.setOutputFile(new File(m_destinationFilename)); m_Exp.setResultListener(irl); } else if (m_ResultsDestinationCBox.getSelectedItem() == DEST_CSV_TEXT) { CSVResultListener crl = new CSVResultListener(); crl.setOutputFile(new File(m_destinationFilename)); m_Exp.setResultListener(crl);
} else { if (m_ResultsDestinationCBox.getSelectedItem() == DEST_ARFF_TEXT) { InstancesResultListener irl = new InstancesResultListener(); if (!m_destinationFilename.equals("")) { irl.setOutputFile(new File(m_destinationFilename)); } m_Exp.setResultListener(irl); } else if (m_ResultsDestinationCBox.getSelectedItem() == DEST_CSV_TEXT) { CSVResultListener crl = new CSVResultListener(); if (!m_destinationFilename.equals("")) { crl.setOutputFile(new File(m_destinationFilename)); } m_Exp.setResultListener(crl); }
  private void destinationTypeChanged() {    if (m_Exp == null) return;    if (m_ResultsDestinationCBox.getSelectedItem() == DEST_DATABASE_TEXT) {      m_ResultsDestinationPathLabel.setText("URL:");      m_ResultsDestinationPathTField.setText(m_destinationDatabaseURL);      m_BrowseDestinationButton.setEnabled(true); //!!!      m_BrowseDestinationButton.setText("User...");    } else {      m_ResultsDestinationPathLabel.setText("Filename:");      m_ResultsDestinationPathTField.setText(m_destinationFilename);      m_BrowseDestinationButton.setEnabled(true);      m_BrowseDestinationButton.setText("Browse...");    }    if (m_ResultsDestinationCBox.getSelectedItem() == DEST_DATABASE_TEXT) {      DatabaseResultListener drl = null;      try {	drl = new DatabaseResultListener();      } catch (Exception e) {	e.printStackTrace();      }      drl.setDatabaseURL(m_destinationDatabaseURL);      m_Exp.setResultListener(drl);    } else if (m_ResultsDestinationCBox.getSelectedItem() == DEST_ARFF_TEXT) {      InstancesResultListener irl = new InstancesResultListener();      irl.setOutputFile(new File(m_destinationFilename));      m_Exp.setResultListener(irl);    } else if (m_ResultsDestinationCBox.getSelectedItem() == DEST_CSV_TEXT) {      CSVResultListener crl = new CSVResultListener();      crl.setOutputFile(new File(m_destinationFilename));      m_Exp.setResultListener(crl);    }    m_Support.firePropertyChange("", null, null);  }