Java Reference
In-Depth Information
buttonPanel.add(play);
buttonPanel.add(stop);
buttonPanel.add(loop);
add(buttonPanel,BorderLayout.SOUTH);
}
public void actionPerformed(ActionEvent event)
{
if (event.getSource() == play)
clip.play();
if (event.getSource() == stop)
clip.stop();
if (event.getSource() == loop)
clip.loop();
}
}
There is very little to see with this simple interface, of course, but what there is
shown in Fig. 11.2 .
Fig. 11.2 Interface for
program SimpleSound
11.4
The Java Media Framework
As noted at the start of this chapter, the playing of video fi les requires the download-
ing of an extra API: the Java Media Framework (JMF) . This API may be downloaded
(for free) from the following URL:
http://www.oracle.com/technetwork/java/javase/download-142937.html
***Please note***
Unfortunately, this very useful API has received no development in over a
decade! As a consequence of this, there is no 64-bit version and anybody wishing to
use the JMF must use the 32-bit version.
Search WWH ::




Custom Search