question: private void destinationTypeChanged ( ) { if ( m_Exp == null ) return ; String str = "" ; if ( m_ResultsDestinationCBox . getSelectedItem ( ) == DEST_DATABASE_TEXT ) { m_ResultsDestinationPathLabel . setText ( "URL:" ) ; str = m_destinationDatabaseURL ; m_BrowseDestinationButton . setEnabled ( true ) ; m_BrowseDestinationButton . setText ( "User..." ) ; } else { m_ResultsDestinationPathLabel . setText ( "Filename:" ) ; if ( m_ResultsDestinationCBox . getSelectedItem ( ) == DEST_ARFF_TEXT ) { int ind = m_destinationFilename . lastIndexOf ( ".csv" ) ; if ( ind > - 1 ) { m_destinationFilename = m_destinationFilename . substring ( 0 , ind ) + ".arff" ; } } if ( m_ResultsDestinationCBox . getSelectedItem ( ) == DEST_CSV_TEXT ) { int ind = m_destinationFilename . lastIndexOf ( ".arff" ) ; if ( ind > - 1 ) { m_destinationFilename = m_destinationFilename . substring ( 0 , ind ) + ".csv" ; } } str = m_destinationFilename ; if ( m_ResultsDestinationCBox . getSelectedItem ( ) == DEST_ARFF_TEXT ) { int ind = str . lastIndexOf ( ".csv" ) ; if ( ind > - 1 ) { str = str . substring ( 0 , ind ) + ".arff" ; } } if ( m_ResultsDestinationCBox . getSelectedItem ( ) == DEST_CSV_TEXT ) { int ind = str . lastIndexOf ( ".arff" ) ; if ( ind > - 1 ) { str = str . substring ( 0 , ind ) + ".csv" ; } } 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 ( ) ; 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 ) ; } } m_ResultsDestinationPathTField . setText ( str ) ; m_Support . firePropertyChange ( "" , null , null ) ; }
target:  Responds to a change in the destination type.