Desain seperti pada gambar.
Masukkan file mp3 di C:\\
Masukkan file mp3 di C:\\
Coding pada tombol PLAY:
if(evt.getActionCommand().equals("PLAY")){
try{
player = Manager.createPlayer(new URL("file",null,"C:\\LIFE.mp3"));
labelmp1.setText(labelmp1.getText()+" :LIFE.mp3");
player.start();
}catch(Exception ex){}
}
Coding pada tombol STOP:
player.stop();
Hasil :
04.16 |
Category:
Applet
|
0
komentar
Comments (0)