PatchEdit.Clipboard=driver.createNewPatch(); PatchEdit.Clipboard.deviceNum = (int) ((deviceAssignment)deviceComboBox.getSelectedItem()).getDeviceNum(); PatchEdit.Clipboard.driverNum = (int) ((driverAssignment)driverComboBox.getSelectedItem()).getDriverNum(); System.out.println("deviceNum="+PatchEdit.Clipboard.deviceNum+" & driverNum="+PatchEdit.Clipboard.driverNum);
Patch p = driver.createNewPatch(); if (p != null) { PatchEdit.Clipboard = p;     } else { ErrorMsg.reportError("New Patch Error", "The driver does not support `New Patch' function."); }
        public void actionPerformed(ActionEvent e)        {	  device = (Device) ((deviceAssignment)deviceComboBox.getSelectedItem()).getDevice();	  driver = (Driver) ((driverAssignment)driverComboBox.getSelectedItem()).getDriver();	  System.out.println("Bingo "+driver.toString());	  //System.out.println(deviceComboBox.getSelectedIndex()+" & "+ driverComboBox.getSelectedIndex());          PatchEdit.Clipboard=driver.createNewPatch();	  PatchEdit.Clipboard.deviceNum = (int) ((deviceAssignment)deviceComboBox.getSelectedItem()).getDeviceNum();	  PatchEdit.Clipboard.driverNum = (int) ((driverAssignment)driverComboBox.getSelectedItem()).getDriverNum(); 	  System.out.println("deviceNum="+PatchEdit.Clipboard.deviceNum+" & driverNum="+PatchEdit.Clipboard.driverNum);          setVisible(false);	  dispose();                        }