?? square.java
字號:
import java.awt.*;
//畫正方型方格的Square類繼承SquareShape類
class Square extends SquareShape
{
private Color squareColor=new Color(82,165,165);//藍綠
public Square(Graphics g)
{
super(g);
this.color=squareColor;
}
//默認的正方形的方格的位置
protected void defaultRotate()
{
for(int i=0;i<2;i++)
{
position[i][0]=xpos+i*20;
position[i][1]=ypos;
}
for(int i=0;i<2;i++)
{
position[i+2][0]=xpos+i*20;
position[i+2][1]=ypos+20;
}
}
//第一次旋轉的位置
protected void firstRotate()
{
this.defaultRotate();
}
//第二次旋轉的位置
protected void secondRotate()
{
this.defaultRotate();
}
//第三次旋轉的位置
protected void thirdRotate()
{
this.defaultRotate();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -