⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 au_player.java

📁 一个AU_Player播放器,,是有java开发的,提大家学习
💻 JAVA
字号:
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);  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -