Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package kolos;
- import java.awt.*;
- import java.util.Random;
- public class Kwadrat {
- float a, b, x, y;
- Color c;
- public Kwadrat(float x, float y, float a, float b){
- this.x = x;
- this.y = y;
- this.a = a;
- this.b = b;
- }
- public void draw(Graphics g) {
- g.setColor(Color.yellow);
- g.fillRect((int)(x-a),(int)(y-a), (int)a, (int)b);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement