Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:16:54+00:00 2026-06-03T04:16:54+00:00

I am building a small Swing application that I would like to embed a

  • 0

I am building a small Swing application that I would like to embed a movie within. Importantly, this application is a WebStart application – and the library should be able to be packaged within the jnlp that I launch -i.e, not dependent on native libraries.

I am aware of and have tried JMF but the format compatibility I believe to be relatively poor when compared to other frameworks out there.

Could someone please provide a sample code snippet of a simple implementation using their recommended library?

Many thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:16:56+00:00Added an answer on June 3, 2026 at 4:16 am

    Some considerations for JavaFX as a solution as a Java based media playback framework.

    1. As of Jdk7u4, JavaFX is co-bundled with the jdk for Mac and Windows
      (XP, Vista, 7, 32 and 64 bit).
    2. JavaFX can be embedded in a Swing App.
    3. JavaFX includes native libraries, but any Java Framework is going to need native libraries to do video well.
    4. A comprehensive deployment toolkit is included with the JavaFX SDK and/or includes the ability to generate jnlp based deployments.
    5. JavaFX 2.1 supports vp6 encoded flvs (older format) as well as some more modern and oft-used encoding formats such as mp4/aac/mp3.
    6. JavaFX only supports limited media codecs and container formats, e.g. if you have a codec installed on your machine and can play a file encoded in that format in, for example chrome, windows media player, or flash that does not guarantee that the same file will play in JavaFX.
    7. Playback of mp4 on XP or Linux requires a user to manually install the necessary codec, but other platforms (osx, win7, vista) do not require manual mp4 codec install.
    8. Use of JavaFX on a mac requires the user to use OpenJDK 7 for Mac, not the Apple JDK.
    9. JavaFX support for jnlp launched apps on Macs won’t be available until later this year (2012) and similarly for Linux.
    10. You could probably bundle the entire JavaFX platform with your app in a jnlp (though I haven’t seen anybody do that yet).
    11. The recommended method for a jnlp deployment would be to add a specification of a minimum JavaFX environment to the jnlp and have the JavaFX deployment toolkit and webstart take care of ensuring that it was present and installed correctly on the user’s machine.
    12. Interaction between Swing and JavaFX requires some inconvenience and care around threading and also a slightly different app launching code between Swing and JavaFX. Some people have complained about this on forums, most don’t seem to have had too many issues.
    13. For better or for worse (I believe better), JavaFX is likely the only media and client development framework from Oracle which is receiving ongoing major development and new features.
    14. Eventually (this year or next) JavaFX will included in all new Java runtimes for all major consumer platforms which run modern versions of Java SE.
    15. Community support for development in JavaFX from Oracle and 3rd parties is (I believe) good.

    Here is a sample JavaFX app which plays a video:

    import javafx.application.Application;
    import javafx.scene.*;
    import javafx.scene.media.*;
    import javafx.stage.Stage;
    
    public class VideoPlayerExample extends Application {
      public static void main(String[] args) throws Exception { launch(args); }
      @Override public void start(final Stage stage) throws Exception {
        final MediaPlayer oracleVid = new MediaPlayer(
          new Media("http://download.oracle.com/otndocs/products/javafx/oow2010-2.flv")
        );
        stage.setScene(new Scene(new Group(new MediaView(oracleVid)), 540, 208));
        stage.show();
    
        oracleVid.play();
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a small Swing application that contains - amongst other things -
I'm currently building a small web application that includes a fair amount of JavaScript.
I am building a small application in RoR that has a form asking for
I'm building a small web based media player that has a basic structure like
We are building a small web application in Rails that will allow clients to
i'm building small sms-like application. I made conversation list view, but there is a
I am building some small Java application to run on Goole AppEngine. It is
I'm building a small app that requieres the IntentReceiver. Actually, I am a newb
I am building a small Application of Spring,Spring MVC & Hibernate by taking reference
I am building a small device with its own CPU (AVR Mega8) that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.