Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running a video instance

 
Dura Hurtado
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am trying to retrieve a web cam signal from a swing app, then from the method:


Video.java
---------

public class Video extends javax.swing.JFrame {
JmfVideo b = new JmfVideo();
/** Creates new form Video */
public Video() {
initComponents();
this.setTitle("WebCam - by Mouse");
//formulario al centro de la pantalla
this.setLocationRelativeTo(null);
//se da un tamaño al jFrame
this.setSize(320, 240);
//se coloca un layout tipo CAJA
getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));
//se añade el componente de Video
this.add( b.componente());
}
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);

pack();
}// </editor-fold>



I am not able to develop a method to run it for example:

public void verVideo(){

Video video=new Video();

¿what way could I continue calling initComponents()?


}

¿Any clue?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic