JNET

Book Figure Beginning Java Programming 2017

Oct 17th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import javax.swing.*;
  2. import java.applet.*;
  3. import java.awt.*;
  4.  
  5. public class bookFigure extends Applet
  6. {
  7. public void paint(Graphics g)
  8. {
  9. super.paint(g);
  10. g.setColor(Color.CYAN);
  11. g.fillRect(20,35,100,100);
  12. Color stair = new Color(191,118,73);
  13. g.setColor(stair);
  14. for(int i = 0; i <= 10; i++)
  15. {
  16. g.fillRect(20,35 + 10 * i,10 * i, 9);
  17. }
  18. g.setColor(Color.WHITE);
  19. g.drawString("BJP", 70,55);
  20. }
  21. public static void main(String[] args)
  22. {
  23. bookFigure make = new bookFigure();
  24. make.setSize(1000,1000);
  25. make.setVisible(true);
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment