0500背景黑色fori
ty1y12yfori
tx1x12xiftilesy14x0ify14xselected如果点击的两个颜色可以连通,则点击的两个椭圆外面的矩形框都是红色gsetColorColorREDelsegsetColorColorWHITE如果点击的两个颜色不可以连通,则第一个椭圆外面的矩形框变成白色gdrawRou
dRect58x132158y1321303088switchtilesy14x随机产生的数字填充相应的颜色case0breakcase1gsetColorColorREDbreakcase2gsetColorColorGREENbreakcase3gsetColorColorBLUEbreakcase4gsetColorColorYELLOWbreakcase5gsetColorColorMAGENTAbreakcase6gsetColorColorwhitebreakcase7
11
f《JavaWEB》课程设计
gsetColorColorCYANbreakgfillArc58x1321458y1321422220360填充覆盖指定矩形的圆弧或椭圆弧ListIteratorA
imatio
ita
imatio
_listlistIteratorwhileithasNextA
imatio
ait
extaupdata0016f075fifatime10fitremoveelseadrawggdisposewhilebsco
te
tsRestoredbsshowwhilebsco
te
tsLostt16666666LSystem
a
oTimetift0LtryThreadsleept1000000Li
tt1000000LcatchI
terruptedExceptio
eframesetVisiblefalseframedisposeSystemexit0
初始化staticvoidi
it初始化i
tmap
ewi
t1010定义并实例化fori
ti0i100i2mapimapi1i
tMathra
dom701生成0和8之间的随机整数fori
ti0i100ii
tji
tMathra
dom1000随机输出1到100之间的数i
ttempmapimapimapjmapjtempi
ti0fori
ty0y14yfori
tx0x14xifx0x13y0y13
12
f《JavaWEB》课程设计
tilesy14x1elseifx1x12y1y12tilesy14x0elsetilesy14xmapiMai
中画连接线fori
ti0i
i按照两个连通矩形的位置画连接线i
dex0pathgetii
dex1pathgeti1x0i
dex0141y0i
dex0141x1i
dex1141y1i
dex1141x058x03216y058y03216x158x13216y158y13216gdrawLi
ex0y0x1y1i
dex0pathget
i
dex1pathget
1x0i
dex0141y0i
dex0141x1i
dex1141y1i
dex1141x058x03216y058y03216x158x13216y158y13216x1i
tx0x1x0ky1i
ty0y1y0kgdrawLi
ex0y0x1y1画圆角矩形gsetColor
ewColor10falpha00falpha00falpha10fswitchtypecase1gdrawRou
dRectx0y0303088gdrawRou
dRectx1y1303088gsetColor