Sep 30, 2004 02:28
import javax.swing.JApplet;
import javax.swing.JRootPane;
import java.awt.Graphics;
import java.awt.Color;
/**
* Class House_1 - A house with a door(and a doorknob), a 4 digit house number written on
* door, two windows, and a chimney, smoke out of the chimney, clouds in the sky
*
* Class: Cosc 111
* Date: 9.28.04
* Project: Project 7||House
*/
public class House_1 extends JApplet
{
/**
* Paint method for applet.
*
* @param g the Graphics object for this applet
*/
public void paint(Graphics g)
{
// simple text displayed on applet
Color sky = new Color(128,255,255);
Color house = new Color(235,181,120);
Color smoke = new Color(180,180,180);
Color door = new Color(91,46,0);
g.setColor(sky);
//main sky and background
g.fillRect(0,0,640,480);
g.setColor(Color.yellow);
//sun
g.fillOval(460,1,75,75);
g.setColor(Color.white);
//clouds
g.fillOval(30,19,60,20);
g.fillOval(32,32,75,20);
g.fillOval(455,35,60,20);
g.fillOval(460,42,65,20);
g.setColor(house);
//main part of house
g.fillRect(250,250,350,230);
g.setColor(Color.gray);
//roof
g.fillRect(225,200,400,140);
g.setColor(smoke);
//smoke in chimney
g.fillOval(265,85,25,45);
g.fillOval(272,75,25,45);
g.fillOval(279,65,25,45);
g.setColor(Color.darkGray);
//chimney
g.fillRect(260,115,55,115);
g.setColor(door);
//door
g.fillRect(300,385,80,155);
g.setColor(Color.white);
//windows
g.fillRect(425,385,55,55);
g.fillRect(495,385,55,55);
//writing on door
g.drawString("5985",324,405);
g.setColor(Color.black);
//black lines in windows
g.drawLine(453,385,453,440);
g.drawLine(523,385,523,440);
g.drawLine(425,413,480,413);
g.drawLine(495,413,550,413);
}
}
i wish i could paste up the picture to show u just what that house looks like
either which way i wanna to make scripts and other such things with java.....not make pictures or else i would take a photoshop or a flash class dammit
....drawing pictures.....