Guest User

Untitled

a guest
Jun 17th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. if (e.getSource() == Music1) {
  2. beethoven.stop();
  3. try {
  4.  
  5. bkmusic = Applet.newAudioClip(new File("bkmusic.mid").toURI().toURL());
  6. if (bkmusic != null) {
  7. bkmusic.loop();
  8.  
  9. }
  10. } catch (Exception f) {
  11. f.printStackTrace();
  12. }
  13. }
  14. if (e.getSource() == Music2) {
  15. bkmusic.stop();
  16. try {
  17.  
  18. beethoven = Applet.newAudioClip(new File("beethoven.wav").toURI().toURL());
  19. if (beethoven != null) {
  20. beethoven.loop();
  21. }
  22. } catch (Exception f) {
  23. f.printStackTrace();
  24. }
  25.  
  26. }
Add Comment
Please, Sign In to add comment