midiConfigPanel.addDriverChangeListener(faderbox);
    public PatchEdit ()    {        super("JSynthLib");        instance = this;              // phil@muqus.com (so can pop-up windows with PatchEdit as the                 boolean loadPrefsSuccessfull,loadDriverSuccessfull;		this.appConfig = new AppConfig();        prefsDialog=new PrefsDialog (this);        loadPrefsSuccessfull=loadPrefs ();		// Add the configuration panels to the prefsDialog        prefsDialog.addPanel(new /*TODO org.jsynthlib.*/GeneralConfigPanel(appConfig));		prefsDialog.addPanel(new /*TODO org.jsynthlib.*/DirectoryConfigPanel(appConfig));		/*TODO org.jsynthlib.*/FaderBoxConfigPanel faderbox = new /*TODO org.jsynthlib.*/FaderBoxConfigPanel(appConfig);		/*TODO org.jsynthlib.midi.*/MidiConfigPanel midiConfigPanel = null;		try {			midiConfigPanel = new /*TODO org.jsynthlib.midi.*/MidiConfigPanel(appConfig);			midiConfigPanel.addDriverChangeListener(this);			midiConfigPanel.addDriverChangeListener(faderbox); // Notify the faderbox, too... - emenaker 2003.03.19    		prefsDialog.addPanel(midiConfigPanel);    		MidiIn = MidiOut = midiConfigPanel.getMidiWrapper();		} catch (Exception e) {			System.err.println(e);			e.printStackTrace();		}		prefsDialog.addPanel(faderbox);		prefsDialog.addPanel(new /*TODO org.jsynthlib.*/NoteChooserConfigPanel(appConfig));        		prefsDialog.init ();  //loads in the config file and sets parameters        // Now lets set up how the pretty application should look        int inset = 100;        Dimension screenSize = Toolkit.getDefaultToolkit ().getScreenSize ();        setBounds (inset, inset,        screenSize.width - inset*2,        screenSize.height-inset*2);                                //Quit this app when the big window closes.        addWindowListener (new WindowAdapter ()        {            public void windowClosing (WindowEvent e)            {                savePrefs ();				// We shouldn't need to unload the midi driver if the whole JVM is going away.                // unloadMidiDriver();				System.exit (0);            }        });                //Set up the GUI.        desktop = new JDesktopPane ();        setJMenuBar (createMenus ());        desktop.setOpaque (false);        Container c=getContentPane ();        c.add (desktop,BorderLayout.CENTER);                desktop.putClientProperty ("JDesktopPane.dragMode", "outline");        setVisible (true);        if (!loadPrefsSuccessfull)            ErrorMsg.reportError ("Error", "Unable to load user preferences. Defaults loaded\n If you've just installed or just upgraded this software, this is normal.");		//if (!loadDriverSuccessfull)            //ErrorMsg.reportError ("Error","Unable to Initialize MIDI IN/OUT! \nMidi Transfer will be unavailable this session.\nChange the Initialization Port Settings under Preferences and restart.");                //Set up a silly little dialog we can pop up for the user to gawk at while we do time consuming work later on.        waitDialog=new WaitDialog (this);                        // Start pumping MIDI information from Input --> Output so the user can play a MIDI Keyboard and make pretty music        beginEcho ();    }