Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- import java.applet.*;
- import java.awt.*;
- public class bookFigure extends Applet
- {
- public void paint(Graphics g)
- {
- super.paint(g);
- g.setColor(Color.CYAN);
- g.fillRect(20,35,100,100);
- Color stair = new Color(191,118,73);
- g.setColor(stair);
- for(int i = 0; i <= 10; i++)
- {
- g.fillRect(20,35 + 10 * i,10 * i, 9);
- }
- g.setColor(Color.WHITE);
- g.drawString("BJP", 70,55);
- }
- public static void main(String[] args)
- {
- bookFigure make = new bookFigure();
- make.setSize(1000,1000);
- make.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment