faderController[currentFader]=cbController.getSelectedIndex (); faderChannel[currentFader]=cbChannel.getSelectedIndex (); faderEnable=enabledBox.isSelected ();
appConfig.setFaderController(currentFader, cbController.getSelectedIndex()); appConfig.setFaderChannel(currentFader, cbChannel.getSelectedIndex()); appConfig.setFaderEnable(enabledBox.isSelected());
    void OKPressed ()    {        initPortIn=cb2.getSelectedIndex ();        initPortOut=cb1.getSelectedIndex ();        masterController=cb3.getSelectedIndex ();        faderPort=cb4.getSelectedIndex ();        if ((lookAndFeel!=cb5.getSelectedIndex ())|| (midiPlatform!=cbPlatform.getSelectedIndex ()))            JOptionPane.showMessageDialog (null, "You must exit and restart the program for your changes to take effect","Changing L&F / Platform", JOptionPane.INFORMATION_MESSAGE);        lookAndFeel=cb5.getSelectedIndex ();        midiPlatform=cbPlatform.getSelectedIndex ();                if (faderPort!=faderPortWas)        {            //FIXME: This is not portable to other MIDI libraries--working around strange JavaMIDI bugs            try            {((JavaMidiWrapper)(PatchEdit.MidiIn)).faderMidiPort.setDeviceNumber (MidiPort.MIDIPORT_INPUT,faderPort);             PatchEdit.MidiIn.setInputDeviceNum (faderPort);             PatchEdit.MidiIn.setInputDeviceNum (masterController);             JOptionPane.showMessageDialog (null, "You must exit and restart the program for this change to take effect","Changing Fader Port", JOptionPane.INFORMATION_MESSAGE);                         }catch (Exception e)            {}            faderPortWas=faderPort;        }        faderController[currentFader]=cbController.getSelectedIndex ();        faderChannel[currentFader]=cbChannel.getSelectedIndex ();        faderEnable=enabledBox.isSelected ();        this.setVisible (false);    }