daniel_lawson9999

Daniel Lawson Java 1 3G Book Figure

Apr 11th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. /**
  2.  * Created by Daniel on 4/11/2016.
  3.  */
  4. import java.awt.*;
  5. public class javaBookFigure {
  6.     public static void main(String[] args){
  7.         DrawingPanel panel =  new DrawingPanel(200,150);
  8.         Graphics g = panel.getGraphics();
  9.         g.setColor(Color.CYAN);
  10.         g.fillRect(20,35,100,100);
  11.         g.setColor(Color.WHITE);
  12.         g.drawString("BJP",70,55);
  13.         Color orange = new Color(191,118,73);
  14.         g.setColor(orange);
  15.         for(int i = 0;i<10;i++ ){//10
  16.             g.fillRect(20,35 +i*10,10 + i*10,9);
  17.         }
  18.  
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment