Advertisement
CSenshi

GraphicsProgramSample

Nov 6th, 2020
1,961
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. package samples;
  2.  
  3. import java.awt.Color;
  4.  
  5. import acm.program.*;
  6.  
  7. public class GraphicsProgramSample extends GraphicsProgram {
  8.  
  9.     public void run() {
  10.         GFace face = new GFace();
  11.         add(face);
  12.  
  13.         GFace face1 = new GFace();
  14.         add(face1, 100, 200);
  15.         face1.setColor(Color.yellow);
  16.  
  17.         GFace face2 = new GFace();
  18.         add(face2, 300, 100);
  19.         face2.setColor(Color.blue);
  20.         face2.scale(0.4);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement