dev=(Device)PatchEdit.appConfig.getDevice(i); for (int j=0;j<dev.driverList.size ();j++) { if (!(Converter.class.isInstance (dev.driverList.get (j)))) driverComboBox.addItem (PatchEdit.getDriver(i,j)); }
deviceComboBox.addItem( dev=(Device)PatchEdit.appConfig.getDevice(i));
  public SysexGetDialog (JFrame Parent) { //, Driver driver, int bankNum, int patchNum) {    super(Parent, "Get Sysex Data", true);    JPanel dialogPanel = new JPanel(new BorderLayout(5, 5));//    dialogPanel.setLayout(new GridLayout(0, 1));    myLabel = new JLabel(" ", JLabel.CENTER);    dialogPanel.add(myLabel, BorderLayout.NORTH);    //=================================== Combo Panel ==================================    //----- Create the combo boxes    driverComboBox = new JComboBox();    driverComboBox.addActionListener(new DriverActionListener());    driverComboBox.setRenderer(new DriverCellRenderer());    bankComboBox = new JComboBox();    bankComboBox.setRenderer(new ComboCellRenderer());    patchNumComboBox = new JComboBox();    patchNumComboBox.setRenderer(new ComboCellRenderer());    //----- Populate the combo boxes  Device dev;        for (int i=0;i<PatchEdit.appConfig.deviceCount();i++)            {                dev=(Device)PatchEdit.appConfig.getDevice(i);                for (int j=0;j<dev.driverList.size ();j++)                {                    if (!(Converter.class.isInstance (dev.driverList.get (j))))                        driverComboBox.addItem (PatchEdit.getDriver(i,j));                }            }     /* Object[] drivers = PatchEdit.DriverList.toArray();    if (drivers.length > 1) {      for (int i = 1; i < drivers.length ; i++)               // Ignore first driver (the core driver)        driverComboBox.addItem(drivers[i]);      driverComboBox.setSelectedIndex(0);    } else {      driverComboBox.setEnabled(false);      bankComboBox.setEnabled(false);      patchNumComboBox.setEnabled(false);    }*/    //----- Layout the labels in a panel.    JPanel labelPanel = new JPanel(new GridLayout(0, 1, 5, 5));    labelPanel.add(new JLabel("Driver:", JLabel.LEFT));    labelPanel.add(new JLabel("Bank:", JLabel.LEFT));    labelPanel.add(new JLabel("Patch:", JLabel.LEFT));    //----- Layout the fields in a panel    JPanel fieldPanel = new JPanel(new GridLayout(0, 1));    fieldPanel.add(driverComboBox);    fieldPanel.add(bankComboBox);    fieldPanel.add(patchNumComboBox);   //----- Create the comboPanel, labels on left, fields on right    JPanel comboPanel = new JPanel(new BorderLayout());    comboPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));    comboPanel.add(labelPanel, BorderLayout.CENTER);    comboPanel.add(fieldPanel, BorderLayout.EAST);    dialogPanel.add(comboPanel, BorderLayout.CENTER);    //=================================== Button Panel ==================================    JPanel buttonPanel = new JPanel();    buttonPanel.setLayout ( new FlowLayout (FlowLayout.CENTER) );    JButton get = new JButton("Get");    get.addActionListener(new GetActionListener());    buttonPanel.add(get);    JButton paste = new JButton("Paste");    paste.addActionListener(new PasteActionListener());    buttonPanel.add(paste);    JButton done = new JButton("Done");    done.addActionListener(new DoneActionListener());    buttonPanel.add(done);    JButton cancel = new JButton ("Cancel");    cancel.addActionListener (      new ActionListener () {        public void actionPerformed (ActionEvent e) {          setVisible(false);          timer.stop();        }      }    );    buttonPanel.add(cancel);    getRootPane().setDefaultButton(done);    dialogPanel.add(buttonPanel, BorderLayout.SOUTH);    //===================================== Timer ========================================    PatchEdit.echoTimer.stop();    timer = new javax.swing.Timer(0, new TimerActionListener());    //===== Listener    //===== Final initialisation of dialog box    getContentPane().add(dialogPanel);    pack();//    setSize(600, 200);    centerDialog();    sysexSize = 0;  }