91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

完整源碼 實(shí)現(xiàn)java 拼圖游戲 很好的課程設(shè)計(jì) 如果需要實(shí)驗(yàn)報(bào)告繼續(xù)下載

資源截圖

代碼片段和文件信息

import?java.awt.*;
import?java.applet.*;
import?java.awt.event.*?;

public?class?pintu?extends?applet?????implements?MouseListenerMouseMotionListener??
{
?????private?Image?picture;
?????private?Graphics?buffer;
????
?????private?Image?pic[];
?????private?Image?off_pic[];
?????private?Graphics?off_buf[];
?????private?Image?off_screen;
?????private?Graphics?off_buffer;????
?????private?Image?off_drag;
?????private?Graphics?off_drag_buf;
????
?????private?int?map[][];
?????private?int?ran[];
?????private?int?width=0;
?????private?int?height=0;
?????private?int?lastx;
?????private?int?lasty;
?????private?int?last_downx;
?????private?int?last_downy;
?????private?int?stepx;
?????private?int?stepy;
?????private?boolean?choose;
?????private?boolean?click[][];
?????private?boolean?m_down;
?????private?boolean?m_drag;
?????private?boolean?not_redraw;
?????private?boolean?able;
?????Font?font1font2;
????
?????//程序的初始化
?????public?void?init()
?????{
?????????resize(640480);
?????????pic?=?new?Image?[3];
?????????off_pic?=???new?Image[16];????????
?????????off_buf?=?new?Graphics?[16];
?????????map?=?new?int?[4][4];
?????????ran?=?new?int?[15];
????????
?????????for(int?a=0;a<16;a++)
?????????????map[a/4][a%4]?=?a;?
?????????for(int?a=0;a<15;a++)
?????????????ran[a]=a;
?????????click=new?boolean?[4][4];
????????
?????????MediaTracker?tracker=?new?MediaTracker?(this);
????????
?????????//要載入的圖片
?????????pic[0]=getImage(getCodebase()“PICTURE0.JPG“);
?????????pic[1]=getImage(getCodebase()“PICTURE1.JPG“);
?????????pic[2]=getImage(getCodebase()“PICTURE2.GIF“);
?????????tracker.addImage?(pic[0]0);
?????????tracker.addImage?(pic[1]0);
?????????tracker.addImage?(pic[2]0);????????
?????????try{
?????????????tracker.waitForID?(0);
?????????}catch(InterruptedException?e){}
????
?????????//設(shè)置字體
?????????font1=?new?Font?(“TimesRoman“?Font.BOLD?48);
?????????font2=?new?Font?(“TimesRoman“?Font.BOLD?32);
?????????width=640;
?????????height=480;
????????
?????????//初始化主界面
?????????initForm();
????????
?????????//添加鼠標(biāo)監(jiān)聽事件
?????????addMouseListener(this);
?????????addMouseMotionListener(this);????????
?????}
????
?????//面板初始化
?????void?initForm()
?????{
?????????this.setBackground?(Color.orange);
?????????if(off_drag==null){
?????????????off_drag?=?createImage(width/4height/4);
?????????????off_drag_buf?=?off_drag.getGraphics?();
?????????}
?????}
????
?????public?void?paint(Graphics?g){
?????????if(off_screen==null)
?????????{
?????????????off_screen?=?createImage(widthheight);
?????????????off_buffer=off_screen.getGraphics?();????????????
?????????}
?????????if(able){
?????????????off_buffer.setColor?(Color.black?);????
????????
?????????????for(int?a=0;a<4;a++)
?????????????????for(int?b=0;b<4;b++)
?????????????????{
?????????????????????if(map[a][b]!=15)
?????????????????????????off_buffer.drawImage?(off_pic[map[a][b]]b*width/4a*height/4this);
????????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????232??2010-12-15?17:35??pintu\.classpath

?????文件????????381??2010-12-15?17:35??pintu\.project

?????文件????????141??2010-12-15?17:36??pintu\bin\java.policy.applet

?????文件???????7816??2010-12-15?23:11??pintu\bin\pintu.class

?????文件?????????92??2010-12-23?21:18??pintu\bin\pintu1293110325483.html

?????文件??????29141??2008-06-27?12:52??pintu\PICTURE0.JPG

?????文件????1440054??2008-06-25?21:46??pintu\PICTURE1.JPG

?????文件??????25530??2009-04-02?19:46??pintu\PICTURE2.GIF

?????文件??????12939??2010-12-15?23:11??pintu\src\pintu.java

?????目錄??????????0??2010-12-23?21:22??pintu\bin

?????目錄??????????0??2010-12-23?21:22??pintu\src

?????目錄??????????0??2010-12-23?21:22??pintu

-----------?---------??----------?-----??----

??????????????1516326????????????????????12


評論

共有 條評論