JMC outside of a JavaFX context?

Discussion in 'Java' started by Qu0ll, Apr 17, 2009.

  1. Qu0ll

    Qu0ll Guest

    Does anyone know if the new Java Media Components (JMC) are usable outside a
    JavaFX context such as in a Swing application? If not, will they be usable
    in this way in Java 7 perhaps?

    --
    And loving it,

    -Qu0ll (Rare, not extinct)
    _________________________________________________

    [Replace the "SixFour" with numbers to email me]
    Qu0ll, Apr 17, 2009
    #1
    1. Advertising

  2. Qu0ll

    Mark Space Guest

    Qu0ll wrote:
    > Does anyone know if the new Java Media Components (JMC) are usable
    > outside a JavaFX context such as in a Swing application? If not, will
    > they be usable in this way in Java 7 perhaps?
    >



    I found this on the web after about 90 seconds of searching:

    import com.sun.media.jmc.JMediaPane;
    import com.sun.media.jmc.Media;

    private final JMediaPane mediaPane = new JMediaPane();

    // Implement the following in a class.
    public void open(File _file) throws AudioPlayerException
    {
    try
    {
    mediaPane.setSource(_file.toURI());
    mediaMetaData = new Media(_file.toURI());
    mediaPane.play();

    }
    catch (Exception _ex)
    {
    }
    }
    Mark Space, Apr 17, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eisa Ayed

    JavaFX , what its mean ???

    Eisa Ayed, May 10, 2007, in forum: Java
    Replies:
    3
    Views:
    512
    tahir akhtar
    May 10, 2007
  2. Replies:
    0
    Views:
    326
  3. Replies:
    6
    Views:
    485
  4. Replies:
    11
    Views:
    1,647
    Arne Vajhøj
    Jan 28, 2009
  5. Krzysztof Poc

    outside type, outside function

    Krzysztof Poc, Feb 3, 2012, in forum: C++
    Replies:
    1
    Views:
    266
    Victor Bazarov
    Feb 7, 2012
Loading...

Share This Page