Playing audio is another important aspect of any rich client platform. One of the celebrated features of JavaFX is its ability to easily playback audio content. This recipe shows you how to create code that plays back audio resources using the
This recipe uses classes from the Media API located in the
javafx.scene.media package. As you will see in our example, using this API you are able to load, configure, and playback audio using the classes
MediaPlayer. For this recipe, we will build a simple audio player to illustrate the concepts presented here. Instead of using standard GUI controls, we will use button icons loaded as images. If you are not familiar with the concept ...