public void actionPerformed(ActionEvent e)
    {
        if(e.getSource()==timerRandOper)
        {
            cleanList(Schedule.completeList);
            cleanList(deadList);
            int i=0;
            int m=(int)(Math.random()*3);
            if(m==0)
                i=1;
            switch (i)
            {
                case 0://创建进程
                    creatProc();
                    break;
                case 1://唤醒进程
                    wakeupProc();
                    break;
            }
        }
        else if(e.getSource()==timerCrtProc)
        {
            if(newPcb!=null)//有新进程创建，执行动画
            {
                //根据进程的优先级访问其应在优先级队列的元素个数，从而确定pcb最终位置，描绘沿途的点数组
                //getPriorListSize(int prior)
                //计算路径//确定创建进程的动画路径
                LinkedList ps=new LinkedList();
                ps.add(new Point(640,15));
                ps.add(new Point(640,135));
                ps.add(new Point(585,135));
                int n=scdl.getPriorListSize(newPcb.prior);
                ps.add(new Point(585,135+50*newPcb.prior));
                ps.add(new Point(90+n*55,135+50*newPcb.prior));
                boolean finish=newPcb.moveLines(ps);
                if(newPcb.getX()<90)//避免出现一直走不停地bug
                    finish=true;
                if(finish)//动画完成
                {
                    scdl.loadProc(newPcb);//加入就绪队列
                    newPcb=null;
                }
                repaint();
            }
        }
    }