资源简介
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个文件信息
相关资源
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
- 基于jsp的bbs论坛 非常详细
- [免费]java实现有障碍物的贪吃蛇游戏
- java Servlet投票实例
评论
共有 条评论