code: public void start() {
  
  		if (!started.compareAndSet(false, true)) {
  			return;
  		}
  
  		webcam.addWebcamListener(this);
  
  		LOG.debug("Starting panel rendering and trying to open attached webcam");
  
  		updater.start();
  
  		starting = true;
  
  		final SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
  
  			@Override
  			protected Void doInBackground() throws Exception {
  
  				try {
  					if (!webcam.isOpen()) {
  						errored = !webcam.open();
  					}
  				} catch (WebcamException e) {
  					errored = true;
  					throw e;
  				} finally {
  					starting = false;
  					repaintPanel();
  				}
  
  				return null;
  			}
  		};
  		worker.execute();
  	}
docs: Open webcam and start rendering.