-
Notifications
You must be signed in to change notification settings - Fork 0
/
BigHouse.java
executable file
·56 lines (45 loc) · 1.17 KB
/
BigHouse.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
Miles Robertson
9/22/16
Per 6
Big House To draw and fill shapes
*/
import java.awt.Graphics;
import java.awt.Color;
import java.awt.Canvas;
public class BigHouse extends Canvas
{
public BigHouse()
{
setSize(800,600);
setBackground(Color.WHITE);
setVisible(true);
}
public void paint( Graphics window )
{
bigHouse(window);
}
public void bigHouse( Graphics window )
{
/*window.setColor(Color.BLUE);
window.drawString ("BIG HOUSE", 50, 50 );
window.setColor(Color.BLUE);
window.fillRect( 200, 200, 400, 400 );
*/
window.setColor(Color.magenta);
window.drawString( "BIG HOUSE ",370, 50);
window.setColor(Color.BLUE);
window.fillRect(200, 200, 400, 400 );
window.setColor(Color.WHITE);
window.fillRect( 350, 410, 100, 170 );
window.setColor(Color.YELLOW);
window.fillRect( 250, 250, 80, 80 );
window.setColor(Color.YELLOW);
window.fillRect( 470, 250, 80, 80 );
window.setColor(Color.red);
window.fillRect( 160, 180, 480, 40 );
window.setColor(Color.orange);
//window.fillRect( 160, 180, 480, 40 );
//(x position, y position, x dimension, y dimension)
}
}