Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by Daniel on 4/11/2016.
- */
- import java.awt.*;
- public class javaBookFigure {
- public static void main(String[] args){
- DrawingPanel panel = new DrawingPanel(200,150);
- Graphics g = panel.getGraphics();
- g.setColor(Color.CYAN);
- g.fillRect(20,35,100,100);
- g.setColor(Color.WHITE);
- g.drawString("BJP",70,55);
- Color orange = new Color(191,118,73);
- g.setColor(orange);
- for(int i = 0;i<10;i++ ){//10
- g.fillRect(20,35 +i*10,10 + i*10,9);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment