public void ExtractSelectedPatch() { if (table.getSelectedRowCount()==0) { ErrorMsg.reportError("Error","No Patch Selected."); return; } Patch myPatch=((Patch)myModel.PatchList.get(table.getSelectedRow())); BankDriver myDriver=(BankDriver)myPatch.getDriver(); for (int i=0;i<myDriver.getNumPatches();i++) if (myDriver.getPatch(myPatch,i)!=null) myModel.PatchList.add(myDriver.getPatch(myPatch,i));
public void ExtractSelectedPatch() { if (table.getSelectedRowCount() == 0) { ErrorMsg.reportError("Error", "No Patch Selected."); return; } Patch myPatch = myModel.getPatchAt(table.getSelectedRow()); BankDriver myDriver = (BankDriver) myPatch.getDriver(); for (int i = 0; i < myDriver.getNumPatches(); i++) if (myDriver.getPatch(myPatch, i) != null) myModel.addPatch(myDriver.getPatch(myPatch, i));
    public void ExtractSelectedPatch()    {        if (table.getSelectedRowCount()==0)        {ErrorMsg.reportError("Error","No Patch Selected.");return;}        Patch myPatch=((Patch)myModel.PatchList.get(table.getSelectedRow()));        BankDriver myDriver=(BankDriver)myPatch.getDriver();        for (int i=0;i<myDriver.getNumPatches();i++)            if (myDriver.getPatch(myPatch,i)!=null) myModel.PatchList.add(myDriver.getPatch(myPatch,i));        myModel.fireTableDataChanged();        changed=true;     //   statusBar.setText(myModel.PatchList.size()+" Patches");    }