PatchEdit.reassignAction.setEnabled(true);
            public void internalFrameActivated(InternalFrameEvent e) {                PatchEdit.receiveAction.setEnabled(true);                PatchEdit.pasteAction.setEnabled(true);                PatchEdit.importAction.setEnabled(true);                PatchEdit.importAllAction.setEnabled(true);                PatchEdit.newPatchAction.setEnabled(true);                                if (table.getRowCount()>0) {                    PatchEdit.saveAction.setEnabled(true);                    PatchEdit.menuSaveAs.setEnabled(true);                    PatchEdit.searchAction.setEnabled(true);                    PatchEdit.transferPerformanceAction.setEnabled(true);                }                                if (table.getRowCount()>1) {                    PatchEdit.sortAction.setEnabled(true);                    PatchEdit.dupAction.setEnabled(true);                    PatchEdit.crossBreedAction.setEnabled(true);                }                                if (table.getSelectedRowCount()>0) {                    PatchEdit.extractAction.setEnabled(true);                    PatchEdit.sendAction.setEnabled(true);                    PatchEdit.playAction.setEnabled(true);                    PatchEdit.storeAction.setEnabled(true);                                        Patch myPatch=((Performance)myModel.performanceList.get(table.getSelectedRow())).getPatch();                    try{                        // look, if the driver for the selected patch brings his own editor                        myPatch.getDriver().getClass().getDeclaredMethod("editPatch", new Class[]{myPatch.getClass()});                        // since the call didn't throw an exception, the driver implements the method itself                        PatchEdit.editAction.setEnabled(true);                    }                    catch(NoSuchMethodException ex) {                        // oh, the driver has no own editor. Is it a bank driver?                        if (myPatch.getDriver() instanceof BankDriver) {                            // for a bankDriver is it ok, since the universal bankEditor works                            PatchEdit.editAction.setEnabled(true);                        }                        else {                            // don't allow editing                            PatchEdit.editAction.setEnabled(false);                        }                    };                                        PatchEdit.cutAction.setEnabled(true);                    PatchEdit.copyAction.setEnabled(true);                    PatchEdit.deleteAction.setEnabled(true);                    PatchEdit.exportAction.setEnabled(true);                }                            }