public Webcam getWebcam ( Dimension dimension ) { if ( webcams . size ( ) == 0 ) { throw new IllegalStateException ( "No webcams found" ) ; } Webcam webcam = webcams . values ( ) . iterator ( ) . next ( ) ; openWebcam ( webcam , dimension ) ; return webcam ; }
Returns the first webcam .