How to play an audio in Netbeans 7.3.1?

0 votes
asked by (340 points)
edited by

1 Answer

0 votes
answered by (264k points)

String bip = "bip.mp3";
Media hit = new Media(bip);
MediaPlayer mediaPlayer = new MediaPlayer(hit);
mediaPlayer.play();

import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...