Exemplo n.º 1
0
 public static void fireEvent(String fileName, String comment, boolean isMusic) {
   comment = comment.toLowerCase();
   if (comment != "music") {
     JOptionPane.showMessageDialog(
         null,
         "Error: Type mismatch, tryed to convert music to " + comment,
         "Error",
         JOptionPane.ERROR_MESSAGE);
   }
   if (isMusic == false) {
     JOptionPane.showMessageDialog(
         null,
         "Error:  Something went wrong in music init.  :(",
         "Error",
         JOptionPane.ERROR_MESSAGE);
   }
   song = new Music(fileName);
   song.play();
 }
Exemplo n.º 2
0
 public static void stopMusic() {
   song.fadeOutMusic();
 }