PatchEdit.uploadAction.setEnabled(false);
            public void valueChanged(ListSelectionEvent e)            {                //System.out.println ("ValueChanged"+((ListSelectionModel)e.getSource ()).getMaxSelectionIndex ());                if (((ListSelectionModel)e.getSource()).getMaxSelectionIndex()>=0)                {                    PatchEdit.extractAction.setEnabled(true);                    PatchEdit.sendAction.setEnabled(true);                    PatchEdit.sendToAction.setEnabled(true);                    PatchEdit.playAction.setEnabled(true);                    PatchEdit.storeAction.setEnabled(true); 		    PatchEdit.reassignAction.setEnabled(true);                    Patch myPatch=((Patch)myModel.PatchList.get(table.getSelectedRow()));                    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);                        else                            PatchEdit.editAction.setEnabled(false);                    };                    PatchEdit.copyAction.setEnabled(true);                    PatchEdit.cutAction.setEnabled(true);                    PatchEdit.deleteAction.setEnabled(true);                    PatchEdit.exportAction.setEnabled(true);                }                else                {                    PatchEdit.extractAction.setEnabled(false);                    PatchEdit.sendAction.setEnabled(false);                    PatchEdit.sendToAction.setEnabled(false);                    PatchEdit.playAction.setEnabled(false);                    PatchEdit.storeAction.setEnabled(false); 		    PatchEdit.reassignAction.setEnabled(false);                    PatchEdit.editAction.setEnabled(false);                    PatchEdit.copyAction.setEnabled(false);                    PatchEdit.cutAction.setEnabled(false);                    PatchEdit.deleteAction.setEnabled(false);                }            }