📄 soundloader.java
字号:
import java.applet.*;import javax.swing.*;import java.net.URL;import java.net.MalformedURLException;class SoundLoader extends Thread { SoundList soundList; URL completeURL; String relativeURL; public SoundLoader(SoundList soundList, URL baseURL, String relativeURL) { this.soundList = soundList; try { completeURL = new URL(baseURL, relativeURL); } catch (MalformedURLException e){ System.err.println(e.getMessage()); } this.relativeURL = relativeURL; setPriority(MIN_PRIORITY); start(); } public void run() { AudioClip audioClip = Applet.newAudioClip(completeURL); soundList.putClip(audioClip, relativeURL); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -