📄 showwin.java
字号:
package os.whb;
import java.awt.*;
import java.util.ArrayDeque;
import java.util.LinkedList;
public class ShowWin extends Frame{
JC[] jc1 = new JC[20];
//ArrayDeque[] jcQueue = new ArrayDeque[30];
TextField 进程号 = new TextField();
TextField 进入时间 = new TextField();
TextField 执行所需时间 = new TextField();
Button b_add = new Button("添加进程");
Button b_FCFS = new Button("FCFS");
Button b_TR = new Button("时间片轮转");
Button b_HRN = new Button("HRN");
TextArea t1 = new TextArea();
TextArea t2 = new TextArea();
public ShowWin(){
setTitle("操作系统进程调度的模拟");
setSize(700,400);
this.setBackground(Color.cyan);
setVisible(true);
this.setLayout(new FlowLayout());
Panel save = new Panel();
save.setLayout(new GridLayout(6,2));
save.add(new Label("输入进程号"));
save.add(进程号);
save.add(new Label("输入到达时间"));
save.add(进入时间);
save.add(new Label("输入执行所需时间"));
save.add(执行所需时间);
save.add(new Label("点击添加"));
save.add(b_add);
save.add(b_FCFS);
save.add(b_TR);
save.add(b_HRN);
this.add(save);
Panel show = new Panel();
show.setLayout(new GridLayout(2,1));
show.add(t1);
show.add(t2);
this.add(show);
b_add.addActionListener(new MyListener(this));
b_FCFS.addActionListener(new MyListener(this));
b_TR.addActionListener(new MyListener(this));
b_HRN.addActionListener(new MyListener(this));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -