Replaced local copy of background music with a remotely stored one

This commit is contained in:
Bokros Bálint 2016-05-15 20:17:00 +02:00
parent 99e22292fe
commit 893294b227

View File

@ -3,6 +3,7 @@ package cicaprojekt;
import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@ -33,7 +34,7 @@ public class Display extends JPanel{
public void startMusic() {
try(AudioInputStream ais =
AudioSystem.getAudioInputStream(new File("tomboy2.wav"))) {
AudioSystem.getAudioInputStream(new URL("http://users.hszk.bme.hu/~bb1376/tomboy.wav"))) {
clip = AudioSystem.getClip();
clip.open(ais);
clip.start();