FileDocCategorySizeDatePackage
BasicQTPlayer.javaAPI DocExample2070Wed Nov 10 12:37:28 GMT 2004com.oreilly.qtjnotebook.ch02

BasicQTPlayer

public class BasicQTPlayer extends Frame

Fields Summary
Constructors Summary
public BasicQTPlayer(Movie m)

        super ("Basic QT Player");
        QTComponent qc = QTFactory.makeQTComponent (m);
        Component c = qc.asComponent();
        add (c);
        pack();
    
Methods Summary
public static voidmain(java.lang.String[] args)

        try {
            QTSessionCheck.check();
            QTFile file =
                QTFile.standardGetFilePreview (QTFile.kStandardQTFileTypes);
            OpenMovieFile omFile = OpenMovieFile.asRead (file);
            Movie m = Movie.fromFile (omFile);
            Frame f = new BasicQTPlayer (m);
            f.pack();
            f.setVisible(true);
            m.start();
        } catch (Exception e) {
            e.printStackTrace();
        }