Draw the house :)

Hi everyone how can i simply draw a house in javalike this one /\ / \ -| - || | ||and i know its an ugly house :)
[169 byte] By [Eduua] at [2007-10-2 10:51:44]
# 1

just as a rough idea, you need to create a window (JFrame) add a custom component that will draw your house. this might give you an idea, check out the java API for what you can do with the Graphics class

public class MyHouse extends JPanel {

public void paintComponent(Graphics g){

g.drawLine(....)

....

....

}

}

public class Driver {

public static void main(String args) {

JFrame jf = new JFrame();

jf.getContentPane().add(new MyHouse() );

jf.setVisible( true );

}

}

Chris@WSUa at 2007-7-13 3:10:54 > top of Java-index,Java Essentials,New To Java...
# 2
thnx, but this display the house in a new frame right?i want it in DOS
Eduua at 2007-7-13 3:10:54 > top of Java-index,Java Essentials,New To Java...
# 3
Oh im sorry i misunderstoodyou can print one line at a time with system.out.printlnSystem.out.println(" /\");.........
Chris@WSUa at 2007-7-13 3:10:54 > top of Java-index,Java Essentials,New To Java...
# 4

/** Draw a house :)*/

public class house

{

static public void main(String[] args)

{

System.out.println("/\");

System.out.println("/ \");

System.out.println("-");

System.out.println("| - |");

System.out.println("| | ||");

}

}

still not working :(

It gives me 3 errors

2x Unclosed string literal - Lines 6 and 7

and 1x ' } ' expected line 11

Eduua at 2007-7-13 3:10:54 > top of Java-index,Java Essentials,New To Java...
# 5

/** Draw a house :) */

public class house {

static public void main(String[] args) {

System.out.println("/\\");

System.out.println("/ \\");

System.out.println("-");

System.out.println("| - |");

System.out.println("| | ||");

}

}

Chris@WSUa at 2007-7-13 3:10:54 > top of Java-index,Java Essentials,New To Java...