I really need help my grade depends on this!!
So in my programming class we are suppose to create a picture of a house. ive been having a problem with my
java compiler(in Eclipse), it keeps returning "Selection does not contain a main type".
Heres the program can some one tell me what to
import javax.Swing.*;
import java.awt.*;
public class House extends JFrame {
public House()
{
super();
Container contentPane = getContentPane();
setSize(800,600);
setTitle("My House");
contentPane.setbackground(Color.blue);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void paint(Graphics g)
{
Super.paint(g);
g.setColor(Color.green);
g.fillRect(0,450,800, 450);
g.setColor(new Color(222,184,135));
g.fillRect(275,250,250,250);
g.setColor(new Color(139,69,19) );
int[] x = {250,400,550};
int[] y = {270,100,270};
g.drawPolygon(x,y,3);
g.fillPolygon(x,y,3);
g.setColor(new Color(139,69,19));
g.fillRect(370,400,60,100);
g.setColor(new Color(0,0,0));
g.fillOval(380,440,10,10);
g.setColor(new Color(255,250,205));
g.fillRect(315,300,50,50);
g.fillRect(435,300,50,50);
g.setCOlor(new Color(0,0,0));
g.drawLine(315,325,265,325);
g.drawLine(340,300,340,350);
g.drawLine(435,325,485,325);
g.drawLine(460,300,460,350);
g.setColor(new Color (139,69,19);
g.fillOval(380,505,45,25);
g.fillOval(360,535,45,25);
g.fillOval(335,560,45,25);
g.fillOval(50,50,130,80);
g.fillOval(120,50,110,80);
g.setColor(Color.white);
g.fillOval(50,50,130,80);
g.fillOval(120,50,110,80);
g.setOval(Color.yellow);
g.fillOval(660,70,80,80);
g.drawLine(660,70,80,80);
g.drawLine(700,30,700,190);
g.drawLine(630,50,760,170);
g.drawLine(630,170,760,50);
}
public static void main(
String[] args) {
House h = new House();
}
}