Ejemplo n.º 1
0
 @Override
 public void dispose() {
   super.dispose();
   if (webCam != null) {
     webCam.stop();
   }
 }
Ejemplo n.º 2
0
 /**
  * Creates new form PairThisDeviceDialog
  *
  * @throws Exception
  */
 public PairThisDeviceDialog(java.awt.Frame parent) throws Exception {
   super(parent, true);
   loadDeviceList();
   initComponents(0);
   setDeviceList();
   QRCodeProcessor proc = new QRCodeProcessor();
   proc.addSquareCodeListener(this);
   try {
     if (camLifeViewPanel instanceof OpenCVWebCam) {
       webCam = (OpenCVWebCam) camLifeViewPanel;
       webCam.setImageProcessor(proc);
       webCam.start();
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   setLocationRelativeTo(null);
 }