资源描述:
《uml建模技术-图书管理系统为例建模过程3》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、22-Àý×Ó1importjava.applet.*;importjava.awt.*;publicclassExample22_1extendsApplet{Imageimg;publicvoidstart(){img=getImage(getCodeBase(),"vintdev.jpg");}publicvoidpaint(Graphicsg){g.drawImage(img,2,2,this);}}22-Àý×Ó2importjava.applet.*;importjava.awt.*;publicclassExamp
2、le22_2extendsApplet{Imageimg;intheight,width;publicvoidstart(){img=getImage(getCodeBase(),"vintdev.jpg");height=img.getHeight(this);width=img.getWidth(this);}publicvoidpaint(Graphicsg){g.drawImage(img,22,72,width,height,this);g.drawImage(img,2+width,2+height,width,he
3、ight,this);}}22-Àý×Ó3importjava.applet.*;importjava.awt.*;publicclassWuqiongextendsApplet{staticImageimg;Canvascanvas;staticintwidth,height;publicvoidinit(){setLayout(newGridLayout(3,1));add(newButton("×£ºÃ"));add(newButton("½ø²½"));canvas=newMycanvas();add(canvas);w
4、idth=getSize().width;height=getSize().height;}publicvoidstart(){img=getImage(getCodeBase(),"Tom1.jpg");}}classMycanvasextendsCanvas{publicvoidpaint(Graphicsg){g.drawImage(Wuqiong.img,0,0,Wuqiong.width,(Wuqiong.height)/3,this);}}22-Àý×Ó4importjava.applet.*;importjava.
5、awt.*;importjava.awt.event.*;publicclassExample22_4extendsAppletimplementsMouseListener{finalintnumber=38;intcount=0;Image[]card=newImage[number];publicvoidinit(){addMouseListener(this);for(inti=0;i6、icvoidpaint(Graphicsg){if((card[count])!=null)g.drawImage(card[count],10,10,card[count].getWidth(this),card[count].getHeight(this),this);}publicvoidmousePressed(MouseEvente){count++;if(count>number)count=0;repaint();}publicvoidmouseReleased(MouseEvente){}publicvoidmo
7、useEntered(MouseEvente){}publicvoidmouseExited(MouseEvente){}publicvoidmouseClicked(MouseEvente){}}22-Àý×Ó5importjava.applet.*;importjava.awt.*;importjava.awt.event.*;publicclassExample22_5extendsAppletimplementsRunnable{finalintnumber=59;intcount=0;Threadmythread;Im
8、age[]pic=newImage[number];publicvoidinit(){for(inti=0;i