?? soundeffects.java
字號:
// SoundEffects.java
// Returns AudioClip objects
package com.deitel.jhtp5.elevator.view;
// Java core packages
import java.applet.*;
public class SoundEffects {
// location of sound files
private String prefix = "";
public SoundEffects() {}
// get AudioClip associated with soundFile
public AudioClip getAudioClip( String soundFile )
{
try {
return Applet.newAudioClip( getClass().getResource(
prefix + soundFile ) );
}
// return null if soundFile does not exist
catch ( NullPointerException nullPointerException ) {
return null;
}
}
// set prefix for location of soundFile
public void setPathPrefix( String string )
{
prefix = string;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -