Guest User

Untitled

a guest
Aug 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import java.awt.*;
  2.  
  3. public class build
  4. {
  5. private int baseX;
  6. private int baseY;
  7. private Color color;
  8. private int height;
  9.  
  10. public build (int center, int bottom, Color shade, int size)
  11. {
  12. baseX = center;
  13. baseY = bottom;
  14. color = shade;
  15. height = size;
  16. }
  17.  
  18. public void draw(Graphics page)
  19. {
  20. int top = baseY - height; //top of head
  21.  
  22. page.setColor (color);
  23.  
  24. page.drawLine (baseX-30, top-10, baseX-30, baseY+200); // | |
  25. page.drawLine (baseX+350, top-10, baseX+350, baseY+200);
  26.  
  27. page.drawLine (baseX+20, baseY+200, baseX, baseY+200); // ______
  28.  
  29. drawRect(baseX, baseY, width, length);
  30. // fillRect
  31.  
  32. }
  33. }
Add Comment
Please, Sign In to add comment