Guest User

Untitled

a guest
May 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package objectoriented;
  6. import java.awt.*;
  7. import javax.swing.*;
  8. /**
  9.  *
  10.  * @author AMRoche
  11.  */
  12. public class RectScrib extends Shape implements Drawable {
  13.     int w,x,y,z;
  14.     Color lol;
  15.     boolean troll;
  16.    
  17.     public RectScrib(int a,int b,int c,int d,int arr, int gee, int bee, boolean face){
  18.         w = a;
  19.         x = b;
  20.         y = c;
  21.         z = d;
  22.         lol = new Color(arr,gee,bee);
  23.     troll = face;
  24.     }
  25.    
  26.        public void draw(Graphics g) {
  27.  
  28.         if (troll == true){  
  29.         g.setColor(lol);
  30.         g.fillRect(w,x,y,z);}
  31.         if (troll == false){
  32.             g.setColor(lol);
  33.             g.drawRect(w, x, y, z);
  34.         }
  35.  
  36.     }
  37.  
  38.     public static void main(String[] args) {
  39.  
  40.     }
  41. }
Add Comment
Please, Sign In to add comment