资源描述:
《java课程设计总报告(模拟电梯系统)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Java课程设计报告组号:第四组课题名称:模拟电梯调度班级:09计一课题组成员姓名及学号:课程设计日期:2011.6.20-2011.6.24地点:秋白楼B720程序源代码:importjava.awt.*;importjava.awt.event.*;importjava.applet.Applet;publicclasslastdtextendsAppletimplementsRunnable,ActionListener{Threadth1;inty1=440,y2=440,y3=440,x1=10,x2=10,x3=10,x4=10,x5=10,x6=10;booleanopen1=f
2、alse,open2=false,open3=false,move=false,moving1=false,moving2=false,moving3=false;ints,t;intn1[]={0,0,0},n2[]={0,0,0},n3[]={0,0,0},number[]={0,0,0,0};inta1,a2,a3,b1,b2,b3,c1,c2,c3;Labell1,l2,l3,l4,l5,l6,l7,l8,l9;ImageBufferImage;GraphicsBufferGraphics;Buttonbt1=newButton("up");Buttonbt3=newButton("1
3、");Buttonbt4=newButton("2");Buttonbt5=newButton("3");Buttonbt21=newButton("up");Buttonbt22=newButton("down");Buttonbt23=newButton("1");Buttonbt24=newButton("2");Buttonbt25=newButton("3");Buttonbt32=newButton("down");Buttonbt33=newButton("1");Buttonbt34=newButton("2");Buttonbt35=newButton("3");public
4、voidinit(){setLayout(null);Fontf=newFont("TimesNewRoman",Font.PLAIN,20);l1=newLabel("1");l2=newLabel("1");l3=newLabel("1");l4=newLabel("1");l5=newLabel("1");l6=newLabel("1");l7=newLabel("1");l8=newLabel("1");l9=newLabel("1");add(l1);add(l2);add(l3);add(l4);add(l5);add(l6);add(l7);add(l8);add(l9);l1.
5、setBounds(80,535,10,18);l2.setBounds(100,535,10,18);l3.setBounds(120,535,10,18);l4.setBounds(80,380,10,18);l5.setBounds(100,380,10,18);l6.setBounds(120,380,10,18);l7.setBounds(80,230,10,18);l8.setBounds(100,230,10,18);l9.setBounds(120,230,10,18);Panelpnl1=newPanel(newGridLayout(1,2));Panelpnl2=newPa
6、nel(newGridLayout(1,2));Panelpnl3=newPanel(newGridLayout(1,2));Panelpnl4=newPanel(newGridLayout(3,1));Panelpnl5=newPanel(newGridLayout(3,1));Panelpnl6=newPanel(newGridLayout(3,1));add(pnl1);add(pnl2);add(pnl3);add(pnl4);add(pnl5);add(pnl6);pnl1.setBounds(80,550,80,20);pnl2.setBounds(80,400,80,20);pn
7、l3.setBounds(80,250,80,20);pnl4.setBounds(200,590,20,80);pnl5.setBounds(240,590,20,80);pnl6.setBounds(290,590,20,80);pnl1.add(bt1);pnl2.add(bt21);pnl2.add(bt22);pnl3.add(bt32);pnl4.add(bt3);pnl5.add(b