?? au_player.java
字號(hào):
package au_player;import java.awt.*;import java.awt.event.*;import java.applet.*;public class AU_Player extends Applet { private boolean isStandalone = false; AudioClip music; Button button1=new Button(); Button button2=new Button(); //Get a parameter value public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } //Construct the applet public AU_Player() { } //Initialize the applet public void init() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { music=this.getAudioClip(this.getCodeBase(),"a.au"); button2.setLabel("\u505C\u6B62"); button2.addActionListener(new Applet1_button2_actionAdapter(this)); button1.setLabel("\u64AD\u653E"); button1.addActionListener(new Applet1_button1_actionAdapter(this)); this.add(button1,null); this.add(button2,null); } //Get Applet information public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { return null; } void button1_actionPerformed(ActionEvent e) { music.loop(); } void button2_actionPerformed(ActionEvent e) { music.stop(); }}class Applet1_button1_actionAdapter implements java.awt.event.ActionListener { AU_Player adaptee; Applet1_button1_actionAdapter(AU_Player adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.button1_actionPerformed(e); }}class Applet1_button2_actionAdapter implements java.awt.event.ActionListener { AU_Player adaptee; Applet1_button2_actionAdapter(AU_Player adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.button2_actionPerformed(e); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -