public void choosePatch (Patch p) { int bank=0; if (bankNumbers.length==1)  {storePatch(p,0,0); return;}; try{ String bankstr=(String)JOptionPane.showInputDialog(null,"Please Choose a Bank","Storing Patch", JOptionPane.QUESTION_MESSAGE,null,bankNumbers,bankNumbers[0]); if (bankstr==null) return; for (int i=0;i<bankNumbers.length;i++) if (bankstr.equals(bankNumbers[i])) bank=i; }catch (Exception e) {ErrorMsg.reportStatus(e);} ErrorMsg.reportStatus("BankDriver:ChoosePatch  Bank = "+bank); storePatch(p,bank,0); }
public void choosePatch(Patch p) { int bank = 0; if (bankNumbers.length == 1) { storePatch(p, 0, 0); return; } try { String bankstr = (String) JOptionPane.showInputDialog(null, "Please Choose a Bank", "Storing Patch", JOptionPane.QUESTION_MESSAGE, null, bankNumbers, bankNumbers[0]); if (bankstr == null) return; for (int i = 0; i < bankNumbers.length; i++) if (bankstr.equals(bankNumbers[i])) bank = i; } catch (Exception e) { ErrorMsg.reportStatus(e); } ErrorMsg.reportStatus("BankDriver:ChoosePatch  Bank = " + bank); storePatch(p, bank, 0); }
  public void choosePatch (Patch p)  {    int bank=0;    if (bankNumbers.length==1)  {storePatch(p,0,0); return;};    try{      String bankstr=(String)JOptionPane.showInputDialog(null,"Please Choose a Bank","Storing Patch",                      JOptionPane.QUESTION_MESSAGE,null,bankNumbers,bankNumbers[0]);      if (bankstr==null) return;      for (int i=0;i<bankNumbers.length;i++) if (bankstr.equals(bankNumbers[i])) bank=i;   }catch (Exception e) {ErrorMsg.reportStatus(e);}    ErrorMsg.reportStatus("BankDriver:ChoosePatch  Bank = "+bank);    storePatch(p,bank,0);  }