Download NetBeans!

20070124 Wednesday January 24, 2007

How to Create a Movie Player (Step 3: Creating a Movie Player on the NetBeans Platform)

In the final step of this three part series, we create a completely independent application, with its own launcher, that looks like this:

The special features of this movie player are its ability to show multiple movies simultaneously, together with the fact that you can detach each movie window from the application, and that it is based on the Visual Library, so that you can zoom and pan within a movie. Ultimately, since it uses the Visual Library, maybe you'd add functionality for cropping images from running movies, which is something I'd like to explore.

Everything done in this application in relation to branding has been discussed elsewhere in this blog. For example, the title bar has a distinct name ("NetBeans Movie Player"), the icon in the title bar is changed, the TopComponent tabs do not have borders, a splash screen has been added, all the superfluous IDE modules have been removed so that only those that are relevant to this application remain, and the Favorites window has been branded so that "Movies" instead of "Favorites" appears everywhere in this window. Also, the "Create ZIP Distribution" menu item has created a launcher (such as "movieplayer.exe", under the Windows operating system).

Here's a closer look at the top left corner, with some context around it (must be some way of removing "Editor" from the title bars of the movie windows, but don't know how to do that yet):

Most of this is done by creating a "Module Suite Project" in NetBeans IDE, where you can select to exclude all the IDE modules, so that you can create a stripped-down version of NetBeans IDE. Then you install the additional modules you need (in this case, the module that provides the JMF functionality). And that's it. You now have a rich-client application based on the NetBeans Platform. Your only actual contribution to the application is the JMF functionality discussed in previous parts of this series. All the rest is provided by the NetBeans Platform. Makes sense, because that's what it is for -- to offer a framework where you can hang your modules, or (more poetically) like a concert hall where you place your instruments. And who are the musicians? Well, the end users, of course...

Earlier parts of this series:

Jan 24 2007, 10:37:43 AM PST Permalink