资源简介
用java写的单功能流水线调度程序,属于体系结构范畴

代码片段和文件信息
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
public class WaterLine extends frame {
public static void main(String[] args) {
WaterLine lruc = new WaterLine();
lruc.lauchframe();
}
Graphics g;
Label jlabel1;
//Label jlabel2;
TextArea jta1;
TextField jtf2;
//TextField jtf3;
Button jb_input;
//Button run;
JScrollPane jsp;
JTable jt;
DefaultTableModel dtm;
static String timeslice;
public void lauchframe() {
this.setLayout(null);
this.setBounds(100 100 600 500);
this.setBackground(Color.cyan);
this.setVisible(true);
jlabel1 = new Label(“请输入一个时间块:“);
//jlabel2 = new Label(“请输入设备内容:“);
jta1 = new TextArea();
jtf2 = new TextField();
//jtf3 = new TextField();
jb_input = new Button(“输入“);
//run = new Button(“运行通道管理器“);
jlabel1.setBounds(50 50 110 20);
//jlabel2.setBounds(230 50 90 20);
jta1.setBounds(50 100 500 150);
jtf2.setBounds(170 50 70 20);
//jtf3.setBounds(330 50 90 20);
jb_input.setBounds(450 50 60 20);
//run.setBounds(450 260 100 20);
this.add(jlabel1);
//this.add(jlabel2);
this.add(jta1);
this.add(jtf2);
//this.add(jtf3);
this.add(jb_input);
//this.add(run);
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
jb_input.addActionListener(new InputActionListener());
jb_input.addActionListener(new RunActionListener());
jta1.addKeyListener(new TextAreaThread());
g = this.getGraphics();
new Thread(new PaintThread()).start();
jta1.append(“---------------------Deno the pipline for float point add.---------------------\n“);
jta1.append(“-----------------We want to execute 5 float poing instructions-----------------\n“);
jta1.append(“Here we display all the content in the pipline:\n“);
jta1.append(“Please input a time slice:\n“);
//jta1.append(“ “ + NL[0] + “ “ + NL[1] + “ “ + NL[2]);
}
class InputActionListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
if(jtf2.getText().equals(““)) {
object[] options = { “OK“ };
JOptionPane.showOptionDialog(null “你的输入存在“”,请按提示输入!“ “警告“
JOptionPane.DEFAULT_OPTION JOptionPane.WARNING_MESSAGE
null options options[0]);
}
timeslice = jtf2.getText();
jta1.append(jtf2.getText() + “\n“);
jtf2.setText(““);
}
}
class RunActionListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
new Thread(new TextAreaThread()).start();
}
}
class Painting {
int x y width height;
Color color;
String s;
Boolean flag;
public Painting(int x int yint width int height Color color String s Boolean flag) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.color = color;
this.s = s;
this.flag = flag;
}
public voi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 14161 2009-04-28 10:51 WaterLine.java
----------- --------- ---------- ----- ----
14161 1
- 上一篇:Java实现高级计算器
- 下一篇:安卓手机课程表应用
相关资源
- 微博系统(Java源码,servlet+jsp),适
- java串口通信全套完整代码-导入eclip
- 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论坛 非常详细
评论
共有 条评论