Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- public class build
- {
- private int baseX;
- private int baseY;
- private Color color;
- private int height;
- public build (int center, int bottom, Color shade, int size)
- {
- baseX = center;
- baseY = bottom;
- color = shade;
- height = size;
- }
- public void draw(Graphics page)
- {
- int top = baseY - height; //top of head
- page.setColor (color);
- page.drawLine (baseX-30, top-10, baseX-30, baseY+200); // | |
- page.drawLine (baseX+350, top-10, baseX+350, baseY+200);
- page.drawLine (baseX+20, baseY+200, baseX, baseY+200); // ______
- drawRect(baseX, baseY, width, length);
- // fillRect
- }
- }
Add Comment
Please, Sign In to add comment