Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Β© A+ Computer Science - www.apluscompsci.com
- //Name -
- //Date -
- //Class -
- //Lab -
- import java.awt.Graphics;
- import java.awt.Color;
- import java.awt.Canvas;
- public class BigHouse extends Canvas
- {
- public BigHouse() //constructor - sets up the class
- {
- setSize(800,600);
- setBackground(Color.WHITE);
- setVisible(true);
- }
- public void paint( Graphics window )
- {
- bigHouse(window);
- }
- public void bigHouse( Graphics window )
- {
- window.setColor(Color.RED);
- window.drawString( "BIG HOUSE ", 50, 50 );
- window.setColor(Color.RED);
- window.fillRect( 200, 200, 400, 400 );
- window.fillRect( 100, 100, 200, 500);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement