i=PatchEdit.deviceList.size();
i=PatchEdit.appConfig.deviceCount();
                public void actionPerformed(ActionEvent e) {                    int index=0;                    for (int i=0;i<PatchEdit.deviceList.size();i++) {                        final Device dev=(Device)PatchEdit.deviceList.get(i);                        for (int j=0;j<dev.driverList.size();j++) {                            System.out.println("checking "+PatchEdit.getDriver(i,j).toString()+" "+cb.getSelectedIndex()+" "+index);                            if ((cb.getSelectedIndex()==index)&&(!(Converter.class.isInstance(dev.driverList.get(j))))) {                                                                try {                                    // Keep in mind, that there are drivers around, which can't create new patches.....                                    dev.driverList.get(j).getClass().getDeclaredMethod("createNewPatch",null);                                    System.out.println("Bingo "+index);                                 System.out.println(i+ "&" + j);                                    PatchEdit.Clipboard=PatchEdit.getDriver(i,j).createNewPatch();                                    setVisible(false);                                    i=PatchEdit.deviceList.size();                                    break;                                }                                catch (Exception ex) {                                    ex.printStackTrace();                                }                                                            }                            try {                                dev.driverList.get(j).getClass().getDeclaredMethod("createNewPatch",null);                                if (!(Converter.class.isInstance(dev.driverList.get(j))))                                    index++;                            }                            catch (Exception ex) {                                //System.out.println(ex.toString());                            }                                                    }                    }                }