As my project in Java Programming I will need to build my dream house using TextPad and save it with Java File Type Extension. I need to sketch it to the Graphing Paper to make it easy to pattern and draw the polygon, line, rectangle, curve line and oval.
You know guys; it is not easy to draw a house in Java, after you had done the sketching you need to number the column and row from zero (0). I suggest that you number the column and row from zero (0) to twenty (20), I mean 0-20-40-60-80-100 in every column and row to make it nice to look at. And be sure that you the frame Size to 950,700 to fit the drawing in the window.
I share you the code of my Dream House and the GUI output so that you will have the reference on how to draw your own Dream House Soon.
GUI OUTPUT:
SOURCE CODE:
import javax.swing.*;
import java.awt.*;
public class DrawRect extends JPanel {
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(Color.pink);// roof oval
g.drawOval(160,165,30,60);
g.fillOval(160,165,30,60);
{
g.setColor(Color.red);; //garage roof
int x[] = {160,280,490, 580, 480,445,410,260};
int y[] = {130,240,230,110,120,60,60,140};
g.fillPolygon(x,y,8);
}
{
g.setColor(Color.red);; //garage roof
int x[] = {445,520,490, 580, 480,445,410,260};
int y[] = {60,100,230,110,120,60,60,140};
g.fillPolygon(x,y,8);
}
{
g.setColor(Color.red);; //garage roof
int x[] = {600,880,755, 755, 780, 700, 670, 630};
int y[] = {150,325,310,263,260, 245, 200, 205};
g.fillPolygon(x,y,8);
}
{
g.setColor(Color.red);; //garage roof
int x[] = {580,615,620, 635, 670, 700};
int y[] = {260,210,210, 205, 200, 245};
g.fillPolygon(x,y,6);
}
{
g.setColor(Color.red);; //garage roof
int x[] = {60,160,200, 280, 180, 110,100};
int y[] = {260,200,200, 240, 245, 250, 260};
g.fillPolygon(x,y,7);
}
{
g.setColor(Color.orange);; //wall
int x[] = {240,240,480, 480};
int y[] = {248,542,560, 238};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.orange);; //wall
int x[] = {180,180,240, 480};
int y[] = {252,545,542, 238};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.pink);; //wall
int x[] = {700,700,755, 755};
int y[] = {252,585,580, 263};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.pink);; //wall
int x[] = {755,755,860, 860};
int y[] = {315,570,560, 327};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.orange);; //wall
int x[] = {70,70,180, 180,118,100};
int y[] = {265,540,560, 252,254,266};
g.fillPolygon(x,y,6);
}
g.setColor(Color.red);// center design
g.drawRect(470,240,20,8);
g.fillRect(470,240,20,8);
g.drawRect(470,250,20,8);
g.fillRect(470,250,20,8);
g.drawRect(470,260,20,8);
g.fillRect(470,260,20,8);
g.drawRect(470,270,20,8);
g.fillRect(470,270,20,8);
g.drawRect(470,280,20,8);
g.fillRect(470,280,20,8);
g.drawRect(470,290,20,8);
g.fillRect(470,290,20,8);
g.drawRect(470,300,20,8);
g.fillRect(470,300,20,8);
g.drawRect(470,310,20,8);
g.fillRect(470,310,20,8);
g.drawRect(470,320,20,8);
g.fillRect(470,320,20,8);
g.drawRect(470,330,20,8);
g.fillRect(470,330,20,8);
g.drawRect(470,340,20,8);
g.fillRect(470,340,20,8);
g.drawRect(470,350,20,8);
g.fillRect(470,350,20,8);
g.drawRect(470,360,20,8);
g.fillRect(470,360,20,8);
g.drawRect(470,370,20,8);
g.fillRect(470,370,20,8);
g.drawRect(470,380,20,8);
g.fillRect(470,380,20,8);
g.drawRect(470,390,20,8);
g.fillRect(470,390,20,8);
g.drawRect(470,400,20,8);
g.fillRect(470,400,20,8);
g.drawRect(470,410,20,8);
g.fillRect(470,410,20,8);
g.drawRect(470,420,20,8);
g.fillRect(470,420,20,8);
g.drawRect(470,430,20,8);
g.fillRect(470,430,20,8);
g.drawRect(470,440,20,8);
g.fillRect(470,440,20,8);
g.drawRect(470,450,20,8);
g.fillRect(470,450,20,8);
g.drawRect(470,460,20,8);
g.fillRect(470,460,20,8);
g.drawRect(470,470,20,8);
g.fillRect(470,470,20,8);
g.drawRect(470,480,20,8);
g.fillRect(470,480,20,8);
g.drawRect(470,490,20,8);
g.fillRect(470,490,20,8);
g.drawRect(470,500,20,8);
g.fillRect(470,500,20,8);
g.drawRect(470,510,20,8);
g.fillRect(470,510,20,8);
g.drawRect(470,520,20,8);
g.fillRect(470,520,20,8);
g.drawRect(470,530,20,8);
g.fillRect(470,530,20,8);
g.drawRect(470,540,20,8);
g.fillRect(470,540,20,8);
g.drawRect(470,550,20,8);
g.fillRect(470,550,20,8);
{
g.setColor(Color.pink);; //chemney left
int x[] = {320,320,340, 385, 385, 340};
int y[] = {50,160,160,100, 60, 50};
g.fillPolygon(x,y,6);
}
{
g.setColor(Color.pink);; //chemney left
int x[] = {380,340,320,390};
int y[] = {40,30,40,50};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.pink);; //chemney right
int x[] = {510,540,580, 582};
int y[] = {60,50,40,50};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.pink);; //chemney right
int x[] = {580,580,515, 515, 580};
int y[] = {60,110,120,70, 60};
g.fillPolygon(x,y,5);
}
{
g.setColor(Color.red);; //baseline
int x[] = {70,60,60, 120, 180,240,480,480,240,180};
int y[] = {540,542,580,582, 585,582,600,560,540,542};
g.fillPolygon(x,y,10);
}
{
g.setColor(Color.red);; //baseline
int x[] = {480,480,610,681, 681};
int y[] = {560,600,585,580,543};
g.fillPolygon(x,y,5);
}
g.setColor(Color.red);// side window
g.drawOval(600,280,80,60);
g.fillOval(600,280,80,60);
g.drawRect(600,310,80,233);
g.fillRect(600,310,80,233);
g.setColor(Color.orange);// side window
g.drawOval(600,420,80,60);
g.fillOval(600,420,80,60);
g.drawRect(600,450,80,93);
g.fillRect(600,450,80,93);
g.setColor(Color.orange);//terrace
g.drawRect(610,350,70,50);
g.fillRect(610,350,70,50);
g.setColor(Color.white);
g.drawRect(615,355,10,40);
g.fillRect(615,355,10,40);
g.drawRect(630,355,10,40);
g.fillRect(630,355,10,40);
g.drawRect(645,355,10,40);
g.fillRect(645,355,10,40);
g.drawRect(660,355,10,40);
g.fillRect(660,355,10,40);
g.drawRect(675,355,5,40);
g.fillRect(675,355,5,40);
g.setColor(Color.red);// door
g.drawOval(770,460,80,30);
g.fillOval(770,460,80,30);
g.setColor(Color.white);
g.drawRect(770,473,80,88);
g.fillRect(770,473,80,88);
g.setColor(Color.red);
g.drawRect(845,473,5,88);
g.fillRect(845,473,5,88);
g.setColor(Color.red);// door
g.drawOval(710,280,40,80);
g.fillOval(710,280,40,80);
g.setColor(Color.red);
g.drawRect(710,320,40,260);
g.fillRect(710,320,40,260);
g.setColor(Color.orange);//terrace
g.drawRect(710,350,30,50);
g.fillRect(710,350,30,50);
g.setColor(Color.orange);// side window
g.drawOval(710,420,40,80);
g.fillOval(710,420,40,80);
g.drawRect(710,460,40,120);
g.fillRect(710,460,40,120);
g.setColor(Color.white);
g.drawRect(130,280,40,80);//window
g.fillRect(130,280,40,80);
g.setColor(Color.lightGray);
g.drawRect(130,360,40,80);
g.fillRect(130,360,40,80);
g.setColor(Color.gray);
g.drawRect(130,440,40,80);
g.fillRect(130,440,40,80);
g.setColor(Color.white);
g.drawRect(190,280,40,80);
g.fillRect(190,280,40,80);
g.setColor(Color.lightGray);
g.drawRect(190,360,40,80);
g.fillRect(190,360,40,80);
g.setColor(Color.gray);
g.drawRect(190,440,40,80);
g.fillRect(190,440,40,80);
g.setColor(Color.white);
g.drawRect(300,275,25,65);
g.fillRect(300,275,25,65);
g.drawRect(300,425,25,65);
g.fillRect(300,425,25,65);
g.setColor(Color.gray);
g.drawRect(380,280,45,80);
g.fillRect(380,280,45,80);
g.setColor(Color.lightGray);
g.drawRect(380,360,45,80);
g.fillRect(380,360,45,80);
g.setColor(Color.white);
g.drawRect(380,440,45,80);
g.fillRect(380,440,45,80);
g.setColor(Color.lightGray);
g.drawRect(540,280,30,80);
g.fillRect(540,280,30,80);
g.setColor(Color.gray);
g.drawRect(540,360,30,80);
g.fillRect(540,360,30,80);
g.setColor(Color.lightGray);
g.drawRect(540,440,30,80);
g.fillRect(540,440,30,80);
g.setColor(Color.pink);
g.drawOval(550,150,20,40);// oval
g.fillOval(550,150,20,40);
g.setColor(Color.red);
g.drawLine(200,200,280,240);
g.drawLine(200,200,180,245);
g.drawLine(200,200,160,200);
g.drawLine(160,200,110,250);
g.drawLine(160,200,60,260);
g.setColor(Color.red);
g.drawOval(770,335,20,10);
g.fillOval(770,335,20,10);
g.drawRect(770,340,20,80);//window right
g.fillRect(770,340,20,80);
g.drawOval(800,335,20,10);
g.fillOval(800,335,20,10);
g.drawRect(800,340,20,80);
g.fillRect(800,340,20,80);
g.drawOval(830,335,20,10);
g.fillOval(830,335,20,10);
g.drawRect(830,340,20,80);
g.fillRect(830,340,20,80);
g.drawLine(770,420,830,420);
g.drawLine(790,360,800,360);
g.drawLine(820,360,830,360);
g.setColor(Color.red); //lines
g.drawLine(70,265,70,540);
g.drawLine(860,328,860,560);
g.drawLine(860,328,755,315);
g.drawLine(860,328,878,324);
g.drawLine(680,580,700,583);
g.drawLine(700,583,754,580);
g.drawLine(755,570,860,560);
g.drawLine(60,260,160,130);
g.drawLine(280,240,160,130);
g.drawLine(60,260,100,260);
g.drawLine(100,260,110,250);
g.drawLine(110,250,180,245);
g.drawLine(180,245,280,240);
g.drawLine(280,240,490,230);
g.drawLine(490,230,540,240);
g.drawLine(490,230,580,110);
g.drawLine(580,110,630,205);
g.drawLine(580,260,700,245);
g.drawLine(700,245,778,260);
g.drawLine(70,540,120,540);
g.drawLine(120,540,122,542);
g.drawLine(122,542,180,545);
g.drawLine(180,545,240,540);
g.drawLine(240,540,480,560);
g.drawLine(480,560,590,543);
g.drawLine(590,543,680,543);
g.drawLine(755,580,755,570);
g.drawLine(755,570,860,560);
g.drawLine(860,560,860,327);
g.drawLine(630,205,670,200);
g.drawLine(670,200,700,245);
g.drawLine(120,255,120,540);
g.drawLine(180,252,180,544);
g.drawLine(240,250,240,540);
g.drawLine(65,260,65,265);
g.drawLine(65,265,105,265);
g.drawLine(105,265,115,255);
g.drawLine(115,255,480,238);
g.drawLine(480,238,530,248);
g.drawLine(530,248,540,240);
g.drawLine(580,260,590,265);
g.drawLine(590,265,700,253);
g.drawLine(700,253,755,263);
g.drawLine(755,263,775,260);
g.drawLine(590,265,590,543);
g.drawLine(700,253,700,583);
g.drawLine(755,263,755,580);
g.drawLine(580,260,615,210);
g.drawLine(615,210,622,210);
g.drawLine(622,210,630,205);
g.drawLine(622,210,575,118);
g.drawLine(615,210,570,122);
g.drawLine(540,240,530,200);
g.drawLine(530,200,513,200);
}
public static void main(String[]args) {
DrawRect drawRect=new DrawRect();
JFrame frame=new JFrame("My Dream House");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.getContentPane().add(drawRect);
frame.setSize(950,700);
frame.setVisible(true);
}
}
A simple as that, a very simple programming... right?
You know guys; it is not easy to draw a house in Java, after you had done the sketching you need to number the column and row from zero (0). I suggest that you number the column and row from zero (0) to twenty (20), I mean 0-20-40-60-80-100 in every column and row to make it nice to look at. And be sure that you the frame Size to 950,700 to fit the drawing in the window.
I share you the code of my Dream House and the GUI output so that you will have the reference on how to draw your own Dream House Soon.
GUI OUTPUT:
SOURCE CODE:
import javax.swing.*;
import java.awt.*;
public class DrawRect extends JPanel {
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(Color.pink);// roof oval
g.drawOval(160,165,30,60);
g.fillOval(160,165,30,60);
{
g.setColor(Color.red);; //garage roof
int x[] = {160,280,490, 580, 480,445,410,260};
int y[] = {130,240,230,110,120,60,60,140};
g.fillPolygon(x,y,8);
}
{
g.setColor(Color.red);; //garage roof
int x[] = {445,520,490, 580, 480,445,410,260};
int y[] = {60,100,230,110,120,60,60,140};
g.fillPolygon(x,y,8);
}
{
g.setColor(Color.red);; //garage roof
int x[] = {600,880,755, 755, 780, 700, 670, 630};
int y[] = {150,325,310,263,260, 245, 200, 205};
g.fillPolygon(x,y,8);
}
{
g.setColor(Color.red);; //garage roof
int x[] = {580,615,620, 635, 670, 700};
int y[] = {260,210,210, 205, 200, 245};
g.fillPolygon(x,y,6);
}
{
g.setColor(Color.red);; //garage roof
int x[] = {60,160,200, 280, 180, 110,100};
int y[] = {260,200,200, 240, 245, 250, 260};
g.fillPolygon(x,y,7);
}
{
g.setColor(Color.orange);; //wall
int x[] = {240,240,480, 480};
int y[] = {248,542,560, 238};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.orange);; //wall
int x[] = {180,180,240, 480};
int y[] = {252,545,542, 238};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.pink);; //wall
int x[] = {700,700,755, 755};
int y[] = {252,585,580, 263};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.pink);; //wall
int x[] = {755,755,860, 860};
int y[] = {315,570,560, 327};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.orange);; //wall
int x[] = {70,70,180, 180,118,100};
int y[] = {265,540,560, 252,254,266};
g.fillPolygon(x,y,6);
}
g.setColor(Color.red);// center design
g.drawRect(470,240,20,8);
g.fillRect(470,240,20,8);
g.drawRect(470,250,20,8);
g.fillRect(470,250,20,8);
g.drawRect(470,260,20,8);
g.fillRect(470,260,20,8);
g.drawRect(470,270,20,8);
g.fillRect(470,270,20,8);
g.drawRect(470,280,20,8);
g.fillRect(470,280,20,8);
g.drawRect(470,290,20,8);
g.fillRect(470,290,20,8);
g.drawRect(470,300,20,8);
g.fillRect(470,300,20,8);
g.drawRect(470,310,20,8);
g.fillRect(470,310,20,8);
g.drawRect(470,320,20,8);
g.fillRect(470,320,20,8);
g.drawRect(470,330,20,8);
g.fillRect(470,330,20,8);
g.drawRect(470,340,20,8);
g.fillRect(470,340,20,8);
g.drawRect(470,350,20,8);
g.fillRect(470,350,20,8);
g.drawRect(470,360,20,8);
g.fillRect(470,360,20,8);
g.drawRect(470,370,20,8);
g.fillRect(470,370,20,8);
g.drawRect(470,380,20,8);
g.fillRect(470,380,20,8);
g.drawRect(470,390,20,8);
g.fillRect(470,390,20,8);
g.drawRect(470,400,20,8);
g.fillRect(470,400,20,8);
g.drawRect(470,410,20,8);
g.fillRect(470,410,20,8);
g.drawRect(470,420,20,8);
g.fillRect(470,420,20,8);
g.drawRect(470,430,20,8);
g.fillRect(470,430,20,8);
g.drawRect(470,440,20,8);
g.fillRect(470,440,20,8);
g.drawRect(470,450,20,8);
g.fillRect(470,450,20,8);
g.drawRect(470,460,20,8);
g.fillRect(470,460,20,8);
g.drawRect(470,470,20,8);
g.fillRect(470,470,20,8);
g.drawRect(470,480,20,8);
g.fillRect(470,480,20,8);
g.drawRect(470,490,20,8);
g.fillRect(470,490,20,8);
g.drawRect(470,500,20,8);
g.fillRect(470,500,20,8);
g.drawRect(470,510,20,8);
g.fillRect(470,510,20,8);
g.drawRect(470,520,20,8);
g.fillRect(470,520,20,8);
g.drawRect(470,530,20,8);
g.fillRect(470,530,20,8);
g.drawRect(470,540,20,8);
g.fillRect(470,540,20,8);
g.drawRect(470,550,20,8);
g.fillRect(470,550,20,8);
{
g.setColor(Color.pink);; //chemney left
int x[] = {320,320,340, 385, 385, 340};
int y[] = {50,160,160,100, 60, 50};
g.fillPolygon(x,y,6);
}
{
g.setColor(Color.pink);; //chemney left
int x[] = {380,340,320,390};
int y[] = {40,30,40,50};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.pink);; //chemney right
int x[] = {510,540,580, 582};
int y[] = {60,50,40,50};
g.fillPolygon(x,y,4);
}
{
g.setColor(Color.pink);; //chemney right
int x[] = {580,580,515, 515, 580};
int y[] = {60,110,120,70, 60};
g.fillPolygon(x,y,5);
}
{
g.setColor(Color.red);; //baseline
int x[] = {70,60,60, 120, 180,240,480,480,240,180};
int y[] = {540,542,580,582, 585,582,600,560,540,542};
g.fillPolygon(x,y,10);
}
{
g.setColor(Color.red);; //baseline
int x[] = {480,480,610,681, 681};
int y[] = {560,600,585,580,543};
g.fillPolygon(x,y,5);
}
g.setColor(Color.red);// side window
g.drawOval(600,280,80,60);
g.fillOval(600,280,80,60);
g.drawRect(600,310,80,233);
g.fillRect(600,310,80,233);
g.setColor(Color.orange);// side window
g.drawOval(600,420,80,60);
g.fillOval(600,420,80,60);
g.drawRect(600,450,80,93);
g.fillRect(600,450,80,93);
g.setColor(Color.orange);//terrace
g.drawRect(610,350,70,50);
g.fillRect(610,350,70,50);
g.setColor(Color.white);
g.drawRect(615,355,10,40);
g.fillRect(615,355,10,40);
g.drawRect(630,355,10,40);
g.fillRect(630,355,10,40);
g.drawRect(645,355,10,40);
g.fillRect(645,355,10,40);
g.drawRect(660,355,10,40);
g.fillRect(660,355,10,40);
g.drawRect(675,355,5,40);
g.fillRect(675,355,5,40);
g.setColor(Color.red);// door
g.drawOval(770,460,80,30);
g.fillOval(770,460,80,30);
g.setColor(Color.white);
g.drawRect(770,473,80,88);
g.fillRect(770,473,80,88);
g.setColor(Color.red);
g.drawRect(845,473,5,88);
g.fillRect(845,473,5,88);
g.setColor(Color.red);// door
g.drawOval(710,280,40,80);
g.fillOval(710,280,40,80);
g.setColor(Color.red);
g.drawRect(710,320,40,260);
g.fillRect(710,320,40,260);
g.setColor(Color.orange);//terrace
g.drawRect(710,350,30,50);
g.fillRect(710,350,30,50);
g.setColor(Color.orange);// side window
g.drawOval(710,420,40,80);
g.fillOval(710,420,40,80);
g.drawRect(710,460,40,120);
g.fillRect(710,460,40,120);
g.setColor(Color.white);
g.drawRect(130,280,40,80);//window
g.fillRect(130,280,40,80);
g.setColor(Color.lightGray);
g.drawRect(130,360,40,80);
g.fillRect(130,360,40,80);
g.setColor(Color.gray);
g.drawRect(130,440,40,80);
g.fillRect(130,440,40,80);
g.setColor(Color.white);
g.drawRect(190,280,40,80);
g.fillRect(190,280,40,80);
g.setColor(Color.lightGray);
g.drawRect(190,360,40,80);
g.fillRect(190,360,40,80);
g.setColor(Color.gray);
g.drawRect(190,440,40,80);
g.fillRect(190,440,40,80);
g.setColor(Color.white);
g.drawRect(300,275,25,65);
g.fillRect(300,275,25,65);
g.drawRect(300,425,25,65);
g.fillRect(300,425,25,65);
g.setColor(Color.gray);
g.drawRect(380,280,45,80);
g.fillRect(380,280,45,80);
g.setColor(Color.lightGray);
g.drawRect(380,360,45,80);
g.fillRect(380,360,45,80);
g.setColor(Color.white);
g.drawRect(380,440,45,80);
g.fillRect(380,440,45,80);
g.setColor(Color.lightGray);
g.drawRect(540,280,30,80);
g.fillRect(540,280,30,80);
g.setColor(Color.gray);
g.drawRect(540,360,30,80);
g.fillRect(540,360,30,80);
g.setColor(Color.lightGray);
g.drawRect(540,440,30,80);
g.fillRect(540,440,30,80);
g.setColor(Color.pink);
g.drawOval(550,150,20,40);// oval
g.fillOval(550,150,20,40);
g.setColor(Color.red);
g.drawLine(200,200,280,240);
g.drawLine(200,200,180,245);
g.drawLine(200,200,160,200);
g.drawLine(160,200,110,250);
g.drawLine(160,200,60,260);
g.setColor(Color.red);
g.drawOval(770,335,20,10);
g.fillOval(770,335,20,10);
g.drawRect(770,340,20,80);//window right
g.fillRect(770,340,20,80);
g.drawOval(800,335,20,10);
g.fillOval(800,335,20,10);
g.drawRect(800,340,20,80);
g.fillRect(800,340,20,80);
g.drawOval(830,335,20,10);
g.fillOval(830,335,20,10);
g.drawRect(830,340,20,80);
g.fillRect(830,340,20,80);
g.drawLine(770,420,830,420);
g.drawLine(790,360,800,360);
g.drawLine(820,360,830,360);
g.setColor(Color.red); //lines
g.drawLine(70,265,70,540);
g.drawLine(860,328,860,560);
g.drawLine(860,328,755,315);
g.drawLine(860,328,878,324);
g.drawLine(680,580,700,583);
g.drawLine(700,583,754,580);
g.drawLine(755,570,860,560);
g.drawLine(60,260,160,130);
g.drawLine(280,240,160,130);
g.drawLine(60,260,100,260);
g.drawLine(100,260,110,250);
g.drawLine(110,250,180,245);
g.drawLine(180,245,280,240);
g.drawLine(280,240,490,230);
g.drawLine(490,230,540,240);
g.drawLine(490,230,580,110);
g.drawLine(580,110,630,205);
g.drawLine(580,260,700,245);
g.drawLine(700,245,778,260);
g.drawLine(70,540,120,540);
g.drawLine(120,540,122,542);
g.drawLine(122,542,180,545);
g.drawLine(180,545,240,540);
g.drawLine(240,540,480,560);
g.drawLine(480,560,590,543);
g.drawLine(590,543,680,543);
g.drawLine(755,580,755,570);
g.drawLine(755,570,860,560);
g.drawLine(860,560,860,327);
g.drawLine(630,205,670,200);
g.drawLine(670,200,700,245);
g.drawLine(120,255,120,540);
g.drawLine(180,252,180,544);
g.drawLine(240,250,240,540);
g.drawLine(65,260,65,265);
g.drawLine(65,265,105,265);
g.drawLine(105,265,115,255);
g.drawLine(115,255,480,238);
g.drawLine(480,238,530,248);
g.drawLine(530,248,540,240);
g.drawLine(580,260,590,265);
g.drawLine(590,265,700,253);
g.drawLine(700,253,755,263);
g.drawLine(755,263,775,260);
g.drawLine(590,265,590,543);
g.drawLine(700,253,700,583);
g.drawLine(755,263,755,580);
g.drawLine(580,260,615,210);
g.drawLine(615,210,622,210);
g.drawLine(622,210,630,205);
g.drawLine(622,210,575,118);
g.drawLine(615,210,570,122);
g.drawLine(540,240,530,200);
g.drawLine(530,200,513,200);
}
public static void main(String[]args) {
DrawRect drawRect=new DrawRect();
JFrame frame=new JFrame("My Dream House");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.getContentPane().add(drawRect);
frame.setSize(950,700);
frame.setVisible(true);
}
}
A simple as that, a very simple programming... right?