java小程序,但是音乐会突然停止,想要一直播放怎么处理

java小程序,但是音乐会突然停止,想要一直播放怎么办?
各位高手,这是我做的一个温度转换器,可是根据输入的温度切换图片,一换音乐也跟着停止了,大家知道怎么才能让音乐一直播放吗?谢谢了
import java.awt.*;  
import java.awt.event.*;  
import javax.swing.*;  
import java.io.*;  
import java.applet.Applet;  
import java.awt.Frame;  
import java.net.URL;  
import javax.swing.JPanel;
import java.applet.AudioClip;



//JButton,JTextField,JLabel的用法  
public class CelsiusConverter implements ActionListener {  
JFrame con;  
JPanel Pl,P2;  
JLabel background ;
JTextField txt,txt2;  
JLabel Label1,Label2,Label3,Label4;  
JButton niu,niu2;  
String music = "白日夢鋼琴曲.wav";  
//加了一个变量
int i=0;
//构造函数  
public CelsiusConverter() {  
//创建容器  
con = new JFrame("温度转换器");  
con.setSize(1000,800);  
Pl = new JPanel();
P2 = new JPanel();
Pl.setLayout(new FlowLayout());
addWidgets_1();
P2.setLayout(new FlowLayout());  
addWidgets();
//添加背景音乐
AudioClip clip = Applet.newAudioClip(getClass().getResource(music));  
clip.play();
clip.loop();
//向frame中添加panel  
con.getContentPane().add(Pl,BorderLayout.NORTH); //北边
//关闭窗口时退出  
con.getContentPane().add(P2,BorderLayout.SOUTH); //南边
con.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
//显示转换器  
//con.pack(); //限制改变窗体大小
con.setVisible(true); //可见
}  
//为转换器创建和增加widgets  
private void addWidgets_1(){  
//创建widgets.  
txt = new JTextField(20);  
Label1 = new JLabel("摄氏温度",SwingConstants.LEFT);  
niu = new JButton("转换……");  
Label2 = new JLabel("华氏温度",SwingConstants.LEFT);  

//诊听转换器按钮发出的事件  
niu.addActionListener(this);
//向容器中添加widgets  
Pl.add(txt);  
Pl.add(Label1);  
Pl.add(niu);  
Pl.add(Label2);  
Label1.setBorder(BorderFactory.createEmptyBorder(50,50,50,50));  
Label2.setBorder(BorderFactory.createEmptyBorder(50,50,50,50));  
}

private void addWidgets(){
txt2 = new JTextField(20);  
Label3 = new JLabel("华氏温度",SwingConstants.RIGHT);  
niu2 = new JButton("转换……");  
Label4 = new JLabel("摄氏温度",SwingConstants.RIGHT);
niu2.addActionListener(this);
P2.add(txt2);  
P2.add(Label3);  
P2.add(niu2);  
P2.add(Label4);  
Label3.setBorder(BorderFactory.createEmptyBorder(50,50,50,50));  
Label4.setBorder(BorderFactory.createEmptyBorder(50,50,50,50));

}

//改变了这个方法
//实现ActionListener接口  
public void actionPerformed(ActionEvent e) { //成功运行
//将摄氏温度转换为双精度小数,并且转换为华氏温度  
if(e.getSource()==niu)//有多个组件的话用这个方法获取事件源
{
int temp =  
(int) (Double.parseDouble(txt.getText()) * 1.8 + 32);  
setBack(temp,i);
System.out.println(temp);
Label2.setText(temp + " 华氏度");  
}
else if(e.getSource()==niu2)
{  
int temp1 =  
(int)(((Double.parseDouble(txt2.getText()))-32)/1.8);  
System.out.println(temp1);

//setBack(temp1,i);
Label4.setText(temp1 + " 摄氏度");  
}
}  
//改变了这个方法
//显示图片函数  
public int setBack(int temp,int p) {  
((JPanel)con.getContentPane()).setOpaque(false);  
int a=temp;  
double n=(a-32)/1.8;
if(n>=30)
{
// Winter.jpg这个图片的位置要跟当前这个类是同一个包下  
System.out.println("图片4出来了");
if(p==1)
con.getLayeredPane().remove(background);
ImageIcon img = new ImageIcon(getClass().getResource("夏.jpg"));