隨機數
Random[type
Random[] :
SeedRandom[n] : 以n為seed產生偽隨機數
Randomldistribution : 可以產生各種分布
獲取背景音樂源代碼
import java
import java
import java
import java
public class LX_Thread extends Applet implements ItemListener
{
AudioClip sound;
Choice c=new Choice();
Button play=new Button(
Button loop=new Button(
Button stop=new Button(
public void init(){
c
add(c);
c
add(play);add(loop);add(stop);
play
loop
stop
sound=getAudioClip(getCodeBase()
sound
}
public void itemStateChanged(ItemEvent e){
sound
//sound=getAudioClip(getCodeBase()
}
public void actionPerformed(ActionEvent e){
if(e
else if(e
else if (e
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/25736.html