日期:2014-05-20 浏览次数:20979 次
public void paint(Graphics g){
int x1=0;
int y1=0;
int x2=size().width-1;
int y2=size().height-1;
g.drawRect(x1, y1, x2, y2);
x1=x2/4;
y1=y2/4;
int wide=x2/2;
int high=y2/2;
if(state==ToeDialog.XX){ //画X
g.drawLine(x1, y1, x1+wide, y1+high);
g.drawLine(x1, y1+high, x1+wide, y1);
}
if(state==ToeDialog.OO){ //画圆
g.drawOval(x1,y1,x1+wide/2,y1+high/2);
}
}
int x1=0;
int y1=0;
int x2=size().width-1;
int y2=size().height-1;
g.drawRect(x1, y1, x2, y2);
x1=x2/4;
y1=y2/4;
int wide=x2/2;
int high=y2/2;