Advertisement
RazorBlade57

Untitled

Oct 5th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. //Β© A+ Computer Science - www.apluscompsci.com
  2. //Name -
  3. //Date -
  4. //Class -
  5. //Lab -
  6.  
  7. import java.awt.Graphics;
  8. import java.awt.Color;
  9. import java.awt.Canvas;
  10.  
  11. public class BigHouse extends Canvas
  12. {
  13. public BigHouse() //constructor - sets up the class
  14. {
  15. setSize(800,600);
  16. setBackground(Color.WHITE);
  17. setVisible(true);
  18. }
  19.  
  20. public void paint( Graphics window )
  21. {
  22. bigHouse(window);
  23. }
  24.  
  25. public void bigHouse( Graphics window )
  26. {
  27. window.setColor(Color.RED);
  28.  
  29. window.drawString( "BIG HOUSE ", 50, 50 );
  30.  
  31. window.setColor(Color.RED);
  32.  
  33. window.fillRect( 200, 200, 400, 400 );
  34.  
  35. window.fillRect( 100, 100, 200, 500);
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement