Well, I'm trying to make a music player, so using NetBeans I'm using
this:

public void Reproducir() throws QTException
    {
        File f = new File(String.valueOf(open.getSelectedFile()));
        try
        {
            QTSession.open();
            OpenMovieFile omf = OpenMovieFile.asRead(new QTFile(f));
            Movie m = Movie.fromFile(omf);
            Component c = QTFactory.makeQTComponent(m).asComponent();
            add(c);
            m.start();
        }
        catch(Exception e)
        {
            JOptionPane.showMessageDialog(null,"No se pudo abrir el
archivo");
            QTSession.close();
        }
    }

Then using actionperformed on a JFileChooser:

        Reproducir();
        Open.setVisible(false); //hides the filechooser frame

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to