View difference between Paste ID: PWSUpE1C and AYnEYpcT
SHOW: | | - or go back to the newest paste.
1
package kolos;
2
3
import java.awt.*;
4
import java.util.Random;
5
6
public class Kwadrat {
7-
        float a, x, y;
7+
        float a, b, x, y;
8
        Color c;
9
10-
        public Kwadrat(float x, float y, float a, Color c) {
10+
        public Kwadrat(float x, float y, float a, float b){
11-
                super();
11+
12
                this.y = y;
13
                this.a = a;
14
                this.b = b;
15-
                this.c = c;
15+
16
17
        public void draw(Graphics g) {
18
                g.setColor(Color.yellow);
19
                g.fillRect((int)(x-a),(int)(y-a), (int)a, (int)b);
20-
                g.fillRect((int)(x-a),(int)(y-a), (int)a, (int)a);
20+
21
        }
22
23
}