I am tring to draw a house & street & garden but i stop....?
could plz someone help me and complete my job

this is my code


import java.awt.*;
import javax.swing.*;

public class Zzzzzzzzzzzzzz extends JApplet
{

public void paint(Graphics a) {
house(a);
door(a);
roof(a);
rode(a);

}

void house(Graphics b){

// Draw the house.
b.setColor(Color.pink);
b.fillRect(100, 150, 200, 150);

b.setColor(Color.black);
b.drawRect(100, 150, 199, 150);
}


void door(Graphics b){
// Draw the door.
b.setColor(Color.red);
b.fillRect(180, 230, 40, 70);
b.setColor(Color.black);
b.drawRect(180, 230, 40, 70);
b.fillOval(210, 265, 7, 7);
}


void roof(Graphics b){
// Draw the roof.
b.setColor(Color.green);
int[] roof_xs = {80,320,200,80};
int[] roof_ys = {150,150,40,150};
b.fillPolygon(roof_xs,roof_ys,4);

}


void rode(Graphics b){
// Draw the rode
b.setColor(Color.black);
b.drawLine(25, 350, 360,350);

b.drawLine(25, 400, 360,400);
b.setColor(Color.YELLOW);
b.drawLine(15, 380, 50,380);
b.setColor(Color.red);
b.drawLine(15, 380, 70,380);
}}

Recommended Answers

All 4 Replies

help me plz

OutOfCodeTagsError, redo from start.
NoProblemDescriptionError, program terminated.

What do you mean

read the rules about posting here, you broke about all of them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.