FileDocCategorySizeDatePackage
BasicQTURLController.javaAPI DocExample2500Wed Nov 10 12:37:32 GMT 2004com.oreilly.qtjnotebook.ch02

BasicQTURLController

public class BasicQTURLController extends Frame

Fields Summary
QTComponent
qc
Constructors Summary
public BasicQTURLController()

        super ("Basic QT DataRef/Controller");
        Movie dummyMovie = new Movie();
        qc = QTFactory.makeQTComponent (dummyMovie);
        Component c = qc.asComponent();
        add (c);
        pack();
    
Methods Summary
public static voidmain(java.lang.String[] args)

        try {
            QTSessionCheck.check();
            BasicQTURLController f = new BasicQTURLController ();
            String url =
                javax.swing.JOptionPane.showInputDialog (f,
                                                         "Enter URL");
            DataRef dr = new DataRef (url);
            Movie m = Movie.fromDataRef (dr,
                                         StdQTConstants.newMovieActive);
            MovieController mc = new MovieController (m);
            f.qc.setMovieController (mc);
            f.setVisible(true);
            f.pack();
            m.prePreroll(0, 1.0f);
            m.preroll(0, 1.0f);
            m.start();
        } catch (Exception e) {
            e.printStackTrace();
        }