This discussion is archived
4 Replies Latest reply: Feb 10, 2012 8:35 AM by 916640 RSS

Player Exception quick Help

916640 Newbie
Currently Being Moderated
i have a code to see through the webcam
import javax.swing.*;
import java.awt.Component;
public class SwingCapture {
     public static void main(String[] args) {
          otro perro=new otro();
class otro extends JFrame{
     JLabel Imagen;
          Imagen=new JLabel();
          setLayout( null ); // use a BorderLayou      
          setTitle("Prueba de Camara Web");
     public void proceso(){
               Manager.setHint( Manager.LIGHTWEIGHT_RENDERER, true );
               MediaLocator ml = new MediaLocator("vfw://0");
               Player p = Manager.createRealizedPlayer(ml);
               Component video = p.getVisualComponent();
               if ( video != null ){
                    // add video to the component
                add( video);
          }catch(Exception e){
but it throw the next exception Cannot find a Player for :vfw://0
     at ratatouille.otro.proceso(
     at ratatouille.SwingCapture.main(
where is the error?

PD:sorry for my bad english

Edited by: 913637 on 09-feb-2012 20:39

Edited by: RockBytes on 10-feb-2012 7:47


  • Correct Answers - 10 points
  • Helpful Answers - 5 points