You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
504 B
27 lines
504 B
package JavaBean;
|
|
|
|
import java.awt.*;
|
|
|
|
public class Pointercxs {
|
|
|
|
private int i=0;//第几行
|
|
private int j=0;//几列
|
|
private int x=0;//x坐标
|
|
private int y=0;//y坐标
|
|
private int h=36;//指示器的高
|
|
public Pointercxs(int i, int j, int x, int y){
|
|
this.i=i;
|
|
this.j=j;
|
|
this.x=x;
|
|
this.y=y;
|
|
}
|
|
|
|
public void draw(Graphics p){
|
|
p.setColor(new Color(255,0,0));
|
|
p.drawRect(x-h/2,y-h/2,h,h);
|
|
|
|
|
|
|
|
}
|
|
}
|