1、先写个实体类,代表圆
- public class MyCircle {
- public float x;
- public float y;
- public int r=100;
- public int pointId;
- int red;
- int green;
- int blue;
- Random random=new Random();
- public MyCircle(float x, float y, int pointId) {
- this.x = x;
- this.y = y;
- this.pointId = pointId;
- red=random.nextInt(255);
- green=random.nextInt(255);
- blue=random.nextInt(255);
- }