Maybe you can give me some clues on what can be wrong: I downloaded from Sun the Java Media Framework, which contains the mediaplayer javabean, but I can't use it in Netbeans. It let itself to be correctly installed into the palette manager, but when I try adding the item to a JFrame it shows the following error:
"Cannot load component class javax.media.bean.playerbean.MediaPlayer from JAR file:C\Documents and Settings\Alejandro\Desktop\jmf-2_1_1e-alljava\JMF-2.1.1e\lib\mediaplayer.jar. The class must be compiled and must be on the classpath of the project this form belongs to."
But the jar contains compiled classes and it is registered in the compile-time libraries of the project...
For a workaround, add an empty JPanel instead and set its layout to BorderLayout. Then go to source code and in constructor after initComponents() call create the instance of the MediaPlayer and add it to the panel. So it would look like:
initComponents(); MediaPlayer mediaPlayer = new MediaPlayer(); jPanel1.add(mediaPlayer); mediaPlayer.setMediaLocation("path to a file..."); mediaPlayer.start(); ...
Note you need to add mediaplayer.jar and jmf.jar (or for sure all jars from the framework's lib folder) to the libraries of the project (in Project Properties). [ January 05, 2007: Message edited by: Tomas Pavek ]
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop