Java Applet

  • a8_291169
    了解作者
  • 8.9KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-16 05:12
    上传日期
Java Applet的音频插入、绘图等等
Java Applet.rar
  • 实验代码模板及答案.doc
    64KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/626ff1b640256a40ceb02a0b/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/626ff1b640256a40ceb02a0b/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">&#31532;<span class="_ _0"> </span><span class="ff2 sc1">13<span class="_ _0"> </span></span>&#31456;<span class="ff2 sc1"> <span class="ff3 fs1">Java Applet</span></span></div><div class="t m0 x1 h4 y3 ff1 fs2 fc0 sc0 ls0 ws0">&#23454;&#39564;<span class="_ _1"> </span><span class="ff4 sc1">1 </span>&#25773;&#25918;&#38899;&#39057;</div><div class="t m0 x1 h5 y4 ff2 fs3 fc0 sc1 ls0 ws0">1<span class="ff1 sc0">&#65294;&#31572;&#26696;&#65306;</span></div><div class="t m0 x1 h6 y5 ff1 fs4 fc0 sc1 ls0 ws0">&#12304;&#20195;&#30721;<span class="_ _2"> </span><span class="ff3">1</span>&#12305;&#65306;<span class="_ _0"> </span><span class="ff3"> <span class="fs3">clip.stop();</span></span></div><div class="t m0 x1 h6 y6 ff1 fs4 fc0 sc1 ls0 ws0">&#12304;&#20195;&#30721;<span class="_ _2"> </span><span class="ff3">2</span>&#12305;&#65306;<span class="_ _0"> </span><span class="ff3"> <span class="fs3">clip.play();</span></span></div><div class="t m0 x1 h6 y7 ff1 fs4 fc0 sc1 ls0 ws0">&#12304;&#20195;&#30721;<span class="_ _2"> </span><span class="ff3">3</span>&#12305;&#65306;<span class="_ _0"> </span><span class="ff3"> <span class="fs3">clip.loop();</span></span></div><div class="t m0 x1 h6 y8 ff1 fs4 fc0 sc1 ls0 ws0">&#12304;&#20195;&#30721;<span class="_ _2"> </span><span class="ff3">4</span>&#12305;&#65306;<span class="_ _0"> </span><span class="ff3"> <span class="fs3">clip.stop();</span></span></div><div class="t m0 x1 h5 y9 ff2 fs3 fc0 sc1 ls0 ws0">2<span class="ff1 sc0">&#65294;&#27169;&#26495;&#20195;&#30721;</span><span class="fs4"> </span></div><div class="t m0 x2 h7 ya ff2 fs3 fc0 sc1 ls0 ws0">PlayAudioClip.java</div><div class="t m0 x3 h8 yb ff3 fs4 fc0 sc1 ls0 ws0">import java.applet.*;</div><div class="t m0 x3 h8 yc ff3 fs4 fc0 sc1 ls0 ws0">import java.awt.*;</div><div class="t m0 x3 h8 yd ff3 fs4 fc0 sc1 ls0 ws0">import java.awt.event.*;</div><div class="t m0 x3 h8 ye ff3 fs4 fc0 sc1 ls0 ws0">public class PlayAudioClip extends <span class="_ _3"></span>Applet implements <span class="_ _3"></span>ActionListener<span class="_ _3"></span>,Runnable,ItemListener { </div><div class="t m0 x3 h8 yf ff3 fs4 fc0 sc1 ls0 ws0"> AudioClip clip;</div><div class="t m0 x3 h8 y10 ff3 fs4 fc0 sc1 ls0 ws0"> Choice choice;</div><div class="t m0 x3 h8 y11 ff3 fs4 fc0 sc1 ls0 ws0"> T<span class="_ _3"></span>extField text;</div><div class="t m0 x3 h8 y12 ff3 fs4 fc0 sc1 ls0 ws0"> Thread thread;</div><div class="t m0 x3 h8 y13 ff3 fs4 fc0 sc1 ls0 ws0"> String item=null;</div><div class="t m0 x3 h8 y14 ff3 fs4 fc0 sc1 ls0 ws0"> Button button_play<span class="_ _3"></span>,button_loop,button_stop;</div><div class="t m0 x3 h8 y15 ff3 fs4 fc0 sc1 ls0 ws0"> public void init() { </div><div class="t m0 x3 h8 y16 ff3 fs4 fc0 sc1 ls0 ws0"> choice=new Choice();</div><div class="t m0 x3 h8 y17 ff3 fs4 fc0 sc1 ls0 ws0"> thread=new Thread(this); </div><div class="t m0 x3 h6 y18 ff3 fs4 fc0 sc1 ls0 ws0"> int N=Integer<span class="_ _3"></span>.parseInt(getParameter("<span class="ff1">&#24635;&#25968;</span>"));</div><div class="t m0 x3 h8 y19 ff3 fs4 fc0 sc1 ls0 ws0"> for(int i=1;i&lt;=N;i++)</div><div class="t m0 x3 h8 y1a ff3 fs4 fc0 sc1 ls0 ws0"> choice.add(getParameter(String.valueOf(i))); </div><div class="t m0 x3 h6 y1b ff3 fs4 fc0 sc1 ls0 ws0"> button_play=new Button("<span class="ff1">&#24320;&#22987;&#25773;&#25918;</span>"); </div><div class="t m0 x3 h6 y1c ff3 fs4 fc0 sc1 ls0 ws0"> button_loop=new Button("<span class="ff1">&#24490;&#29615;&#25773;&#25918;</span>");</div><div class="t m0 x3 h6 y1d ff3 fs4 fc0 sc1 ls0 ws0"> button_stop=new Button("<span class="ff1">&#20572;&#27490;&#25773;&#25918;</span>"); </div><div class="t m0 x3 h8 y1e ff3 fs4 fc0 sc1 ls0 ws0"> text=new T<span class="_ _4"></span>extField(12);</div><div class="t m0 x3 h8 y1f ff3 fs4 fc0 sc1 ls0 ws0"> button_play<span class="_ _4"></span>.addActionListener(this); </div><div class="t m0 x3 h8 y20 ff3 fs4 fc0 sc1 ls0 ws0"> button_stop.addActionListener(this);</div><div class="t m0 x3 h8 y21 ff3 fs4 fc0 sc1 ls0 ws0"> button_loop.addActionListener(this); </div><div class="t m0 x3 h8 y22 ff3 fs4 fc0 sc1 ls0 ws0"> choice.addItemListener(this);</div><div class="t m0 x3 h8 y23 ff3 fs4 fc0 sc1 ls0 ws0"> add(choice);</div><div class="t m0 x3 h8 y24 ff3 fs4 fc0 sc1 ls0 ws0"> add(button_play);</div><div class="t m0 x3 h8 y25 ff3 fs4 fc0 sc1 ls0 ws0"> add(button_loop);</div><div class="t m0 x3 h8 y26 ff3 fs4 fc0 sc1 ls0 ws0"> add(button_stop); </div><div class="t m0 x3 h8 y27 ff3 fs4 fc0 sc1 ls0 ws0"> add(text); </div><div class="t m0 x3 h8 y28 ff3 fs4 fc0 sc1 ls0 ws0"> button_play<span class="_ _4"></span>.setEnabled(false);</div><div class="t m0 x3 h8 y29 ff3 fs4 fc0 sc1 ls0 ws0"> button_loop.setEnabled(false); </div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐
    • Java
      Java 对于Java练习
    • java
      Java Java基础
    • Java
      Java 我创建的Java项目
    • JAVA教程
      一本非常不错的清华大学java教程,讲解非常详细,看了就知道。
    • Java Cipher
      Java Cipher 加密和解密工具 附带源码 Java Cipher 加密和解密工具 附带源码 Java Cipher 加密和解密工具 附带源码 Java Cipher 加密和解密工具 附带源码
    • javabank
      Java银行 Java com的模拟操作将在bancárias上发布! 要求:Java 8。
    • java 李兴华
      java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java ...
    • JAVA教程
      详细介绍了JAVA语言程序设计,对JAVA的基础知识运用实例的方式来讲解,使初学者能够非常轻松的掌握。
    • java程序
      java程序-吃点点java程序-吃点点java程序-吃点点java程序-吃点点java程序-吃点点java程序-吃点点
    • Java
      Java 2021/02/19 .java Main.java 学生.java Bmi.java 。班级 Bmi类 主类 MyBmi.class 学生班 学生样本类 2021/02/20 .java DeleteFile.java WriteFile.java MyDataPrint.java 。班级 DeleteFile.class ...