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

📄 音乐.java~52~

📁 这是一个图书和学生信息的管理系统,它可以在数据库里面增加,修改,删除数据来管理图书和学生信息
💻 JAVA~52~
字号:
package 美女;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: </p> * @author not attributable * @version 1.0 */import com.zdsoft.gui.*;import com.zdsoft.datacenter.ASDatacenter;import com.zdsoft.datastore.ASDatastore;import javax.swing.*;import java.awt.*;import java.awt.event.*;import ZQ.*;import java.applet.*;import java.net.URL;import java.io.*;import java.text.*;import java.util.*;public class 音乐 extends ASPanel{  JPanel jPanel1 = new JPanel();  JPanel jPanel2 = new JPanel();  JButton jButton2 = new JButton(); Icon ic = new ImageIcon("meinv.gif"); String s="file:/e:/MIDI音乐/老歌.mid"; String d="file:/e:/MIDI音乐/天薏.mid";   AudioClip id;   AudioClip ie;  JButton jButton1 = new JButton();  JButton jButton3 = new JButton();  JPanel jPanel3 = new JPanel();  JLabel jLabel2 = new JLabel();  JButton jButton4 = new JButton();  JButton sy = new JButton();  GridBagLayout gridBagLayout2 = new GridBagLayout();  JLabel meinv = new JLabel();  public 音乐() {    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  private void jbInit() throws Exception {    meinv.setIcon(ic);    ie = Applet.newAudioClip(new URL(d));    this.setForeground(Color.black);     id = Applet.newAudioClip(new URL(s));    this.setDebugGraphicsOptions(0);    jButton2.setFont(new java.awt.Font("Serif", 0, 12));    jButton2.setForeground(Color.cyan);    jButton2.setText("循环播放");    jButton2.addActionListener(new 音乐_jButton2_actionAdapter(this));    jButton1.setFont(new java.awt.Font("Serif", 0, 12));    jButton1.setForeground(Color.cyan);    jButton1.setText("播放");    jButton1.addActionListener(new 音乐_jButton1_actionAdapter(this));    jButton3.setFont(new java.awt.Font("Serif", 0, 12));    jButton3.setForeground(Color.cyan);    jButton3.setText("停止");    jButton3.addActionListener(new 音乐_jButton3_actionAdapter(this));    jLabel2.setFont(new java.awt.Font("Serif", 0, 20));    jLabel2.setForeground(Color.green);    jLabel2.setText("美女我爱你");    jButton4.setFont(new java.awt.Font("Serif", 0, 12));    jButton4.setForeground(Color.cyan);    jButton4.setText("下一曲");    jButton4.addActionListener(new 音乐_jButton4_actionAdapter(this));    sy.setForeground(Color.cyan);    sy.setPreferredSize(new Dimension(83, 30));    sy.setText("");    sy.addActionListener(new 音乐_sy_actionAdapter(this));    jPanel3.setLayout(gridBagLayout2);    jPanel1.setPreferredSize(new Dimension(385, 40));    jPanel2.setPreferredSize(new Dimension(400, 500));    this.add(jPanel1, BorderLayout.SOUTH);    jPanel1.add(sy, null);    jPanel1.add(jButton1, null);    jPanel1.add(jButton4, null);    jPanel1.add(jButton2, null);    jPanel1.add(jButton3, null);    this.add(jPanel2,  BorderLayout.CENTER);    jPanel2.add(meinv, null);    this.add(jPanel3, BorderLayout.NORTH);    jPanel3.add(jLabel2,   new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 150, 5, 150), 0, 0));  }  void jButton2_actionPerformed(ActionEvent e) { id.loop();  }  void jButton3_actionPerformed(ActionEvent e) {  id.stop();  ie.stop();}  void jButton1_actionPerformed(ActionEvent e) {    sy.setText("");    ie.stop();id.play();  }  void jButton4_actionPerformed(ActionEvent e) {    id.stop();    ie.loop();    sy.setText("上一曲");}  void sy_actionPerformed(ActionEvent e) {id.loop();    ie.stop();  }  void jButton5_actionPerformed(ActionEvent e) {  }}class 音乐_jButton2_actionAdapter implements java.awt.event.ActionListener {  音乐 adaptee;  音乐_jButton2_actionAdapter(音乐 adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButton2_actionPerformed(e);  }}class 音乐_jButton3_actionAdapter implements java.awt.event.ActionListener {  音乐 adaptee;  音乐_jButton3_actionAdapter(音乐 adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButton3_actionPerformed(e);  }}class 音乐_jButton1_actionAdapter implements java.awt.event.ActionListener {  音乐 adaptee;  音乐_jButton1_actionAdapter(音乐 adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButton1_actionPerformed(e);  }}class 音乐_jButton4_actionAdapter implements java.awt.event.ActionListener {  音乐 adaptee;  音乐_jButton4_actionAdapter(音乐 adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButton4_actionPerformed(e);  }}class 音乐_sy_actionAdapter implements java.awt.event.ActionListener {  音乐 adaptee;  音乐_sy_actionAdapter(音乐 adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.sy_actionPerformed(e);  }}

⌨️ 快捷键说明

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