资源简介
Head first java 源码完整版
代码片段和文件信息
package AppendixA;
// chapter 14
import java.awt.*;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.io.*;
import javax.sound.midi.*;
import java.util.*;
import java.awt.event.*;
import java.net.*;
public class BeatBoxFinal { // implements metaEventListener
JPanel mainPanel;
JList incomingList;
JTextField userMessage;
ArrayList checkboxList;
int nextNum;
objectInputStream in;
objectOutputStream out;
Vector listVector = new Vector();
String userName ;
HashMap otherSeqsMap = new HashMap();
Sequencer sequencer;
Sequence sequence;
Sequence mySequence = null;
Track track;
Jframe theframe;
String[] instrumentNames = {“Bass Drum“ “Closed Hi-Hat“
“Open Hi-Hat““Acoustic Snare“ “Crash Cymbal“ “Hand Clap“
“High Tom“ “Hi Bongo“ “Maracas“ “Whistle“ “Low Conga“
“Cowbell“ “Vibraslap“ “Low-mid Tom“ “High Agogo“
“Open Hi Conga“};
int[] instruments = {35424638493950607072645658476763};
public static void main (String[] args) {
new BeatBoxFinal().startUp(args[0]);
}
public void startUp(String name) {
userName = name;
try {
Socket sock = new Socket(“127.0.0.1“ 4242);
out = new objectOutputStream(sock.getOutputStream());
in = new objectInputStream(sock.getInputStream());
Thread remote = new Thread(new RemoteReader());
remote.start();
}
catch (Exception ex) {
System.out.println(“couldn‘t connect - you‘ll have to play alone.“);
}
setUpMidi();
buildGUI();
}
public void buildGUI() {
theframe = new Jframe(“Cyber BeatBox“);
theframe.setDefaultCloseOperation(Jframe.EXIT_ON_CLOSE);
BorderLayout layout = new BorderLayout();
JPanel background = new JPanel(layout);
background.setBorder(BorderFactory.createEmptyBorder(10101010));
checkboxList = new ArrayList();
Box buttonBox = new Box(BoxLayout.Y_AXIS);
JButton start = new JButton(“Start“);
start.addActionListener(new MyStartListener());
buttonBox.add(start);
JButton stop = new JButton(“Stop“);
stop.addActionListener(new MyStopListener());
buttonBox.add(stop);
JButton upTempo = new JButton(“Tempo Up“);
upTempo.addActionListener(new MyUpTempoListener());
buttonBox.add(upTempo);
JButton downTempo = new JButton(“Tempo Down“);
downTempo.addActionListener(new MyDownTempoListener());
buttonBox.add(downTe
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-07-16 17:44 Head-First-Java-master\
目录 0 2015-07-16 17:44 Head-First-Java-master\AppendixA\
文件 911 2015-07-16 17:44 Head-First-Java-master\AppendixA\BeatBoxFinal$MyDownTempoListener.class
文件 1412 2015-07-16 17:44 Head-First-Java-master\AppendixA\BeatBoxFinal$MyListSelectionListener.class
文件 1959 2015-07-16 17:44 Head-First-Java-master\AppendixA\BeatBoxFinal$MySendListener.class
文件 712 2015-07-16 17:44 Head-First-Java-master\AppendixA\BeatBoxFinal$MyStartListener.class
文件 785 2015-07-16 17:44 Head-First-Java-master\AppendixA\BeatBoxFinal$MyStopListener.class
文件 905 2015-07-16 17:44 Head-First-Java-master\AppendixA\BeatBoxFinal$MyUpTempoListener.class
文件 1746 2015-07-16 17:44 Head-First-Java-master\AppendixA\BeatBoxFinal$RemoteReader.class
文件 8885 2015-07-16 17:44 Head-First-Java-master\AppendixA\BeatBoxFinal.class
文件 10954 2015-07-16 17:44 Head-First-Java-master\AppendixA\BeatBoxFinal.java
文件 1402 2015-07-16 17:44 Head-First-Java-master\AppendixA\MusicServer$ClientHandler.class
文件 2120 2015-07-16 17:44 Head-First-Java-master\AppendixA\MusicServer.class
文件 2102 2015-07-16 17:44 Head-First-Java-master\AppendixA\MusicServer.java
文件 43 2015-07-16 17:44 Head-First-Java-master\README.md
目录 0 2015-07-16 17:44 Head-First-Java-master\chap01\
文件 957 2015-07-16 17:44 Head-First-Java-master\chap01\BeerSong.class
文件 861 2015-07-16 17:44 Head-First-Java-master\chap01\BeerSong.java
文件 1673 2015-07-16 17:44 Head-First-Java-master\chap01\PhraseOMatic.class
文件 1307 2015-07-16 17:44 Head-First-Java-master\chap01\PhraseOMatic.java
目录 0 2015-07-16 17:44 Head-First-Java-master\chap02\
文件 496 2015-07-16 17:44 Head-First-Java-master\chap02\GameLauncher.class
文件 175 2015-07-16 17:44 Head-First-Java-master\chap02\GameLauncher.java
文件 1806 2015-07-16 17:44 Head-First-Java-master\chap02\GuessGame.class
文件 1884 2015-07-16 17:44 Head-First-Java-master\chap02\GuessGame.java
文件 746 2015-07-16 17:44 Head-First-Java-master\chap02\Pla
文件 206 2015-07-16 17:44 Head-First-Java-master\chap02\Pla
目录 0 2015-07-16 17:44 Head-First-Java-master\chap03\
文件 1343 2015-07-16 17:44 Head-First-Java-master\chap03\Dog.class
文件 802 2015-07-16 17:44 Head-First-Java-master\chap03\Dog.java
目录 0 2015-07-16 17:44 Head-First-Java-master\chap04\
............此处省略159个文件信息
相关资源
- 基于java socket编写的超市管理系统
- 仓库管理系统+可视化界面java编写
- 计算机外文文献
- 用java写的查询某市地铁的最短路径,
- JAVA实现的银行家算法 做了ui有界面
- java-web实习报告模板
- 编写程序,使用两个线程,一个队列
- 带括号和小数点的java计算器程序
- java 分页组件
- java课程设计java jsoup 爬取1688网站信息
- 阿里巴巴Java开发手册V1.0.2
- 2018年最新java大数据基于storm开发实时
- 基于java的倒排索引
- JAVA实现万年历小程序
- 北大青鸟S2JAVA门禁系统
- java面试题题库全
- Java通过JNA调用TSCLIB.dll控制热敏打印机
- Java Web 三层架构详解
- JAVA拿火柴小游戏
- java 生成word 的第三方控件
-
xm
l-apis.jar包 - 多线程web服务器 附实验报告 java
- 网络五子棋游戏java socket swing 小项目
- java实现js、css、图片合并到html文件
- Java-WebSocket-jar
- 基于JAVA的论坛源码(J2EE 毕业设计)
- pos机java调用程序demo(基于dll调用)
- Python AES和Java AES/ECB/PKCS5Padding互转
- csv文件读下用的jar包
- java解压缩文件文件夹
评论
共有 条评论