PatchEdit.editAction.setEnabled (true);
Patch myPatch=((Patch)myModel.getPatchAt(0,0)); try{ myPatch.getDriver().getClass().getDeclaredMethod("editPatch", new Class[]{myPatch.getClass()}); PatchEdit.editAction.setEnabled(true); } catch(NoSuchMethodException ex) { if (myPatch.getDriver() instanceof BankDriver) PatchEdit.editAction.setEnabled(true); };
            public void internalFrameActivated (InternalFrameEvent e)            {                PatchEdit.receiveAction.setEnabled (false);                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);                }                if (table.getRowCount ()>1)                {                    PatchEdit.sortAction.setEnabled (true);                    PatchEdit.dupAction.setEnabled (true);                }                if (table.getSelectedRowCount ()>0)                {                    PatchEdit.extractAction.setEnabled (true);                    PatchEdit.sendAction.setEnabled (true);                    PatchEdit.playAction.setEnabled (true);                    PatchEdit.storeAction.setEnabled (true);                    PatchEdit.editAction.setEnabled (true);                    PatchEdit.cutAction.setEnabled (true);                    PatchEdit.copyAction.setEnabled (true);                    PatchEdit.deleteAction.setEnabled (true);                    PatchEdit.exportAction.setEnabled (true);                }                                //System.out.println ("Frame activated"+table.getSelectedRowCount ());            }