FCFS算法仿真
import java.util.Date;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.JOptionPane; import javax.swing.*;
class win extends Frame implements ActionListener {
Label label1,label2,label3;
Button button1,button2;
TextField text1;
TextArea area;
win()
{ setLayout(null);
setBounds(0,0,400,600);
label1 =new Label("请输入进程数:");
label2 =new Label("FCFS算法仿真");
label3 =new Label("小组成员:1好,2号,3号,4号");
button1 =new Button("确定");
button2 =new Button("清除");
text1= new TextField();
area = new TextArea();
label1.setBounds(10,70,90,25);
label2.setBounds(100,40,90,25);
label3.setBounds(5,550,400,25);
text1.setBounds(110,70,80,30);
button1.setBounds(210,70,50,30);
button2.setBounds(290,70,50,30);
area.setBounds(10,110,360,400);
add(label1);add(label2);add(label3);add(button1);add(text1);add(area)
;
add(button2);
setVisible(true);
button1.addActionListener(this);
button2.addActionListener(this);
text1.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==button1||e.getSource()==text1)
{
LinkedList create=new LinkedList(); //创建队列
String ss=text1.getText().trim();
char a1[]=ss.toCharArray(); int bi=0;
for(int a=0;a
本文档为【FCFS算法仿真】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。