首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > JBuilder制作音频播放程序,需要注意的是,当播放时,界面上的各个按钮应当仍然可以对用户的操作进行事件响应,所以至少需要两个线程:一个控制歌曲的播放,另外一...

JBuilder制作音频播放程序,需要注意的是,当播放时,界面上的各个按钮应当仍然可以对用户的操作进行事件响应,所以至少需要两个线程:一个控制歌曲的播放,另外一...

  • 资源大小:5.89 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: Java Develop java

资 源 简 介

JBuilder制作音频播放程序,需要注意的是,当播放时,界面上的各个按钮应当仍然可以对用户的操作进行事件响应,所以至少需要两个线程:一个控制歌曲的播放,另外一个对用户事件进行响应。因此我们的AudioPlay类需要实现Runable接口,以使用多线程技术。根据JDK的解释-JDK1.4.0,任何需要由线程执行的实例都应当实现Runable接口,而且由于我们只需要重写run()方法和stop()方法,并给start()方法多态化,所以我们选择实现Runable接口,这样就可以不需要继承Thread类而使用Thread类的实例来运行了。-JBuilder produced audio player, it needs attention is that when players, the interface on the various buttons can still be right for users to operate the incident response, at least two threads : a control song playback, the other to users respond to the incident. Therefore we need to achieve AudioPlay category Runable interface to the use of multi-threading. According to the interpretation of JDK- JDK1.4.0 any need for threaded implementation of the examples are to be achieved Runable interface, and because we only need to be rewritten to run () method and stop () method, and to start () method is polymorphic, so we have chosen to achieve Runable Interface so you can not inherit Thread type and category of use Thread e

文 件 列 表

JBuilder制作音频播放程序(2).htm
VIP VIP
0.186490s