X

Geertjan's Blog

  • January 20, 2007

Watch Movies in NetBeans

Geertjan Wielenga
Product Manager
My long-cherished dream has come true at last... I can watch movies in NetBeans IDE. And, thanks to the powerful windowing system, I can watch multiple movies at once:

Plus, it is very easy to remove all the IDE's modules... and then you're left with a separate non-IDE application that contains only the parts needed for the movie player. Here the application is running on NetBeans 6, so that the windows can be undocked:

To make the above application yourself, you need only have a very minimal knowledge of the NetBeans Platform, which is the framework on which the movie player runs. To see the user interface of the original Swing application, look at the screenshot below (which, though it has "NetBeans" in the titlebar, has nothing to do with NetBeans, other than that I used NetBeans IDE to create it, but I could have created it in any IDE or no IDE at all):

Here you see a simple Swing application that runs movies, using the JMF framework as its basis. Clearly, it is not a fully fledged application. But, the second screenshot above shows a complete, fully-functioning application (though it needs to be cleaned up a little bit, like the icons and so on). If you compare the third screenshot with the second one, you'll immediately see the benefit of the NetBeans Platform. I.e., a windowing system, explorer view, and menus. I did no coding whatsoever for these valuable application features. In fact, porting the application required no additional coding on my part, with the exception of creating the class that opens the movie in the new window, via the NetBeans APIs. All the rest was either given to me for free as part of the NetBeans Platform or provided via templates that come with NetBeans IDE.

The only real work needed for this application is setting up JMF correctly -- you also need some additional stuff, such as Fobs. Then you need to register the additional plugins correctly in the JMF Registry. This part is the most difficult and when things are not working correctly it is almost impossible to know what piece of the puzzle is missing. (This JMF diagnostics tool is very useful.) And each platform has different requirements. All not very nice, but the end result is really cool. High quality resolution, great sound, and the possibility of watching multiple movies simultaneously while having the option of extending the functionality if needed. Hurray for JMF and NetBeans.

Join the discussion

Comments ( 8 )
  • Roumen Saturday, January 20, 2007
    Very cool Geertjan! Greetings from Cairo. Today I presented NetBeans at EGJUG conference - and the mouse didn't work and I had to hold the microphone. So I did demos of Matisse etc. with one hand for both keyboard and touchpad. People were amazed that NetBeans is so easy to use that you can control it with just one hand - some said I looked like a magician :)))
  • Stefan Flemming Saturday, January 20, 2007
    Hey Geertjan, thank you,
    once again one of your best blog entries.
    Have you thought about video streaming? Is it possible?
    It would be so great if i could stream my camera view of the scientific instrument directly into my Netbeans RCP control suite.
  • Geertjan Sunday, January 21, 2007
    Hi Roumen, good to hear you're an Egyptian magician now. (Put it in your CV!) Stefan -- can you explain the use case more exactly? I'm sure it is possible. JMF supports streaming, according to its website, if I understand it correctly. What exactly would you like to do?
  • bobbie-jean Sunday, January 21, 2007
    you are cool.
  • Geertjan Monday, January 22, 2007
    Thanks, bobbie-jean. So are you, probably!
  • Oliver Rettig Tuesday, January 23, 2007
    Hallo,
    can you send me your netbeans project of the movie player module for trying. I am working with motion anlysis in my docoral research in the gaitlab Heidelberg. I have included my modelling and data analysis sofware in Netbeans and it will be great if can also look at the row patient video also inside netbeans.
    best regards
    Oliver
  • Geertjan Thursday, January 25, 2007
    Hi Oliver. Thanks for your question. Look at the three part series on making your own movie player, the code is there. Or write to me at geertjan DOT wielenga AT sun DOT com.
  • guest Saturday, May 5, 2007
    fchbfg
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.