protected void initGUI(int dialogType) {
    Vector<ExtensionFileFilter>	list;
    int				i;
    boolean 			acceptAll;

    // backup current state
    acceptAll = isAcceptAllFileFilterUsed();

    // setup filters
    resetChoosableFileFilters();
    setAcceptAllFileFilterUsed(acceptAll);
    if (dialogType == LOADER_DIALOG)
      list = filterNonCoreLoaderFileFilters(m_LoaderFileFilters);
    else
      list = filterSaverFileFilters(filterNonCoreSaverFileFilters(m_SaverFileFilters));
    for (i = 0; i < list.size(); i++) {
      addChoosableFileFilter(list.get(i));
    }
    if (list.size() > 0) {
      if ( (m_LastFilter == null) || (!list.contains(m_LastFilter)) )
	setFileFilter(list.get(0));
      else
	setFileFilter(m_LastFilter);
    }

    // listener
    if (m_Listener != null)
      removePropertyChangeListener(m_Listener);
    m_Listener = new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent evt) {
	// filter changed
	if (evt.getPropertyName().equals(FILE_FILTER_CHANGED_PROPERTY)) {
	  updateCurrentConverter();
	}
      }
    };
    addPropertyChangeListener(m_Listener);
    
    // initial setup
    if (dialogType == LOADER_DIALOG) {
      m_Editor.setClassType(AbstractFileLoader.class);
      m_Editor.setValue(new weka.core.converters.ArffLoader());
    }
    else {
      m_Editor.setClassType(AbstractFileSaver.class);
      m_Editor.setValue(new weka.core.converters.ArffSaver());
    }
    
    updateCurrentConverter();
  }