Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package objectoriented;
- import java.awt.*;
- import javax.swing.*;
- /**
- *
- * @author AMRoche
- */
- public class RectScrib extends Shape implements Drawable {
- int w,x,y,z;
- Color lol;
- boolean troll;
- public RectScrib(int a,int b,int c,int d,int arr, int gee, int bee, boolean face){
- w = a;
- x = b;
- y = c;
- z = d;
- lol = new Color(arr,gee,bee);
- troll = face;
- }
- public void draw(Graphics g) {
- if (troll == true){
- g.setColor(lol);
- g.fillRect(w,x,y,z);}
- if (troll == false){
- g.setColor(lol);
- g.drawRect(w, x, y, z);
- }
- }
- public static void main(String[] args) {
- }
- }
Add Comment
Please, Sign In to add comment