wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes running a video instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "running a video instance" Watch "running a video instance" New topic
Author

running a video instance

Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
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
 
Consider Paul's rocket mass heater.
 
subject: running a video instance