Saturday, 30 April 2016

                 Presentation in JAVA with out using Power Point

=>presentation in java by using Applets on Stimulation of Road Map of communication between cell phones.
                                                    ..............Happy Coding

First enter password 700646591












////////////////////////////////////////////////////////////////
import java.applet.Applet;
import java.awt.Button;
import java.awt.Color;
import java.awt.Event;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;

public class smiley extends Applet implements ActionListener
{
Image i1,i2;
int j1,lr=1,lrr=1,l1=1,l2=1,l3=1,l4=1;
TextField t1,t2,t3,t4;
Button b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30;
Button b31,b32,b33,b34,b35,b36,b37,b38,b39,b40,b42,b43;

public void init()
{ setLayout(null);
 
    Font f =new Font("verdana",Font.ITALIC,30);
t1 = new TextField(20);
t1.setBounds(860,360,190,50);
t1.setEchoChar('*');
t1.setFont(f);
add(t1);

t2 = new TextField(20);
t2.setBounds(1000,720,250,50);
add(t2);
t2.setFont(f);

t3 = new TextField(20);
t3.setBounds(1200,650,390,50);
t3.setFont(f);
add(t3);

t4 = new TextField(20);
t4.setBounds(1100,800,300,50);
t4.setFont(f);
add(t4);

b1=new Button("SUBMIT");
b1.setBounds(800,450,120,70);
b1.setBackground(Color.PINK);
b1.setForeground(Color.black);
Font myFont = new Font("Courier", Font.BOLD,25);
     b1.setFont(myFont);
     b1.addActionListener(this);
add(b1);

b2=new Button("proceed");
b2.setBounds(1550,700,150,70);
b2.setBackground(Color.PINK);
b2.setForeground(Color.black);
     b2.setFont(myFont);
     b2.addActionListener(this);
add(b2);

b3=new Button("Yes");
b3.setBounds(910,700,100,70);
b3.setBackground(Color.PINK);
b3.setForeground(Color.black);
     b3.setFont(myFont);
     b3.addActionListener(this);
add(b3);

b4=new Button("No");
b4.setBounds(1100,700,100,70);
b4.setBackground(Color.PINK);
b4.setForeground(Color.black);
     b4.setFont(myFont);
     b4.addActionListener(this);
add(b4);

b5=new Button("Yes");
b5.setBounds(920,800,100,70);
b5.setBackground(Color.PINK);
b5.setForeground(Color.black);
     b5.setFont(myFont);
     b5.addActionListener(this);
add(b5);

b6=new Button("No");
b6.setBounds(1100,800,100,70);
b6.setBackground(Color.PINK);
b6.setForeground(Color.black);
     b6.setFont(myFont);
     b6.addActionListener(this);
add(b6);

b7=new Button("Yes");
b7.setBounds(1000,800,100,70);
b7.setBackground(Color.PINK);
b7.setForeground(Color.black);
     b7.setFont(myFont);
     b7.addActionListener(this);
add(b7);

b8=new Button("No");
b8.setBounds(1150,800,100,70);
b8.setBackground(Color.PINK);
b8.setForeground(Color.black);
    b8.setFont(myFont);
    b8.addActionListener(this);
add(b8);

b9=new Button("Yes");
b9.setBounds(1000,800,100,70);
b9.setBackground(Color.PINK);
b9.setForeground(Color.black);
     b9.setFont(myFont);
     b9.addActionListener(this);
add(b9);

b10=new Button("No");
b10.setBounds(1150,800,100,70);
b10.setBackground(Color.PINK);
b10.setForeground(Color.black);
     b10.setFont(myFont);
     b10.addActionListener(this);
add(b10);

b11=new Button("Prev");
b11.setBounds(1300,800,100,70);
b11.setBackground(Color.PINK);
b11.setForeground(Color.black);
     b11.setFont(myFont);
     b11.addActionListener(this);
add(b11);

b12=new Button("Yes");
b12.setBounds(1000,800,100,70);
b12.setBackground(Color.PINK);
b12.setForeground(Color.black);
     b12.setFont(myFont);
     b12.addActionListener(this);
add(b12);

b13=new Button("No");
b13.setBounds(1150,800,100,70);
b13.setBackground(Color.PINK);
b13.setForeground(Color.black);
     b13.setFont(myFont);
     b13.addActionListener(this);
add(b13);

b14=new Button("Prev");
b14.setBounds(1300,800,100,70);
b14.setBackground(Color.PINK);
b14.setForeground(Color.black);
     b14.setFont(myFont);
     b14.addActionListener(this);
add(b14);
///////////////////////
b15=new Button("Yes");
b15.setBounds(1000,800,100,70);
b15.setBackground(Color.PINK);
b15.setForeground(Color.black);
    b15.setFont(myFont);
    b15.addActionListener(this);
add(b15);

b16=new Button("No");
b16.setBounds(1150,800,100,70);
b16.setBackground(Color.PINK);
b16.setForeground(Color.black);
    b16.setFont(myFont);
    b16.addActionListener(this);
add(b16);
b17=new Button("Prev");
b17.setBounds(1300,800,100,70);
b17.setBackground(Color.PINK);
b17.setForeground(Color.black);
    b17.setFont(myFont);
    b17.addActionListener(this);
add(b17);
///////////////////////////////////////

Font myFont1 = new Font("Bradley Hand ITC", Font.BOLD,25);
b18=new Button("1] Mobile antena");
b18.setBounds(300,270,210,75);
b18.setBackground(Color.black);
b18.setForeground(Color.green);
b18.setFont(myFont1);
     b18.addActionListener(this);
add(b18);

b19=new Button("2] Base stations");
b19.setBounds(300,370,210,75);
b19.setBackground(Color.black);
b19.setForeground(Color.green);
     b19.setFont(myFont1);
     b19.addActionListener(this);
add(b19);

b20=new Button("3] Mobile switching centers");
b20.setBounds(300,470,360,75);
b20.setBackground(Color.black);
b20.setForeground(Color.green);
    b20.setFont(myFont1);
    b20.addActionListener(this);
add(b20);
b21=new Button("4] Wireless medium");
b21.setBounds(300,570,250,75);
b21.setBackground(Color.black);
b21.setForeground(Color.green);
    b21.setFont(myFont1);
    b21.addActionListener(this);
add(b21);

b22=new Button("<= Back");
b22.setBounds(1500,550,210,75);
b22.setBackground(Color.black);
b22.setForeground(Color.green);
    b22.setFont(myFont1);
    b22.addActionListener(this);
add(b22);

b23=new Button("SUBMIT");
b23.setBounds(960,760,210,75);
b23.setBackground(Color.black);
b23.setForeground(Color.green);
    b23.setFont(myFont1);
    b23.addActionListener(this);
add(b23);

b24=new Button("Transition");
b24.setBounds(870,190,250,70);
b24.setBackground(Color.PINK);
b24.setForeground(Color.black);
    b24.setFont(myFont);
    b24.addActionListener(this);
add(b24);
b25=new Button("Start");
b25.setBounds(650,190,100,70);
b25.setBackground(Color.PINK);
b25.setForeground(Color.black);
    b25.setFont(myFont);
    b25.addActionListener(this);
add(b25);

b26=new Button("Yes");
b26.setBounds(920,800,100,70);
b26.setBackground(Color.PINK);
b26.setForeground(Color.black);
     b26.setFont(myFont);
     b26.addActionListener(this);
add(b26);

b27=new Button("No");
b27.setBounds(1100,800,100,70);
b27.setBackground(Color.PINK);
b27.setForeground(Color.black);
     b27.setFont(myFont);
     b27.addActionListener(this);
add(b27);

b29=new Button("Transition");
b29.setBounds(870,190,250,70);
b29.setBackground(Color.PINK);
b29.setForeground(Color.black);
    b29.setFont(myFont);
    b29.addActionListener(this);
add(b29);
b28=new Button("Start");
b28.setBounds(650,190,100,70);
b28.setBackground(Color.PINK);
b28.setForeground(Color.black);
    b28.setFont(myFont);
    b28.addActionListener(this);
add(b28);
b30=new Button("To f2");
b30.setBounds(1200,190,100,70);
b30.setBackground(Color.PINK);
b30.setForeground(Color.black);
    b30.setFont(myFont);
    b30.addActionListener(this);
add(b30);


b31=new Button("Yes");
b31.setBounds(920,800,100,70);
b31.setBackground(Color.PINK);
b31.setForeground(Color.black);
     b31.setFont(myFont);
     b31.addActionListener(this);
add(b31);

b32=new Button("No");
b32.setBounds(1100,800,100,70);
b32.setBackground(Color.PINK);
b32.setForeground(Color.black);
     b32.setFont(myFont);
     b32.addActionListener(this);
add(b32);

b33=new Button("Yes");
b33.setBounds(920,800,100,70);
b33.setBackground(Color.PINK);
b33.setForeground(Color.black);
     b33.setFont(myFont);
     b33.addActionListener(this);
add(b33);

b34=new Button("No");
b34.setBounds(1100,800,100,70);
b34.setBackground(Color.PINK);
b34.setForeground(Color.black);
     b34.setFont(myFont);
     b34.addActionListener(this);
add(b34);

b35=new Button("Yes");
b35.setBounds(920,800,100,70);
b35.setBackground(Color.PINK);
b35.setForeground(Color.black);
     b35.setFont(myFont);
     b35.addActionListener(this);
add(b35);

b36=new Button("No");
b36.setBounds(1100,800,100,70);
b36.setBackground(Color.PINK);
b36.setForeground(Color.black);
     b36.setFont(myFont);
     b36.addActionListener(this);
add(b36);

b37=new Button("Yes");
b37.setBounds(920,800,100,70);
b37.setBackground(Color.PINK);
b37.setForeground(Color.black);
     b37.setFont(myFont);
     b37.addActionListener(this);
add(b37);

b38=new Button("No");
b38.setBounds(1100,800,100,70);
b38.setBackground(Color.PINK);
b38.setForeground(Color.black);
     b38.setFont(myFont);
     b38.addActionListener(this);
add(b38);

b39=new Button("proceed");
b39.setBounds(1550,800,140,70);
b39.setBackground(Color.PINK);
b39.setForeground(Color.black);
     b39.setFont(myFont);
     b39.addActionListener(this);
add(b39);


b42=new Button("Yes");
b42.setBounds(920,800,100,70);
b42.setBackground(Color.PINK);
b42.setForeground(Color.black);
     b42.setFont(myFont);
     b42.addActionListener(this);
add(b42);

b43=new Button("No");
b43.setBounds(1100,800,100,70);
b43.setBackground(Color.PINK);
b43.setForeground(Color.black);
     b43.setFont(myFont);
     b43.addActionListener(this);
add(b43);

}
public void paint(Graphics g)
{
    switch (j1)
    {

    case 0:
     {        t2.setVisible(false);
              t3.setVisible(false);
              t4.setVisible(false);

       b2.setVisible(false);
       b3.setVisible(false);
       b4.setVisible(false);
       b5.setVisible(false);
       b6.setVisible(false);
       b7.setVisible(false);
       b8.setVisible(false);    
       b9.setVisible(false);
       b10.setVisible(false);
       b11.setVisible(false);
       b12.setVisible(false);
       b13.setVisible(false);
       b14.setVisible(false);
       b15.setVisible(false);
       b16.setVisible(false);
       b17.setVisible(false);
       b18.setVisible(false);
       b19.setVisible(false);
       b20.setVisible(false);
       b21.setVisible(false);
       b22.setVisible(false);
       b23.setVisible(false);
       b24.setVisible(false);
       b25.setVisible(false);
       b26.setVisible(false);
       b27.setVisible(false);
       b28.setVisible(false);
       b29.setVisible(false);
       b30.setVisible(false);
       b31.setVisible(false);
       b32.setVisible(false);
       b33.setVisible(false);
       b34.setVisible(false);
       b35.setVisible(false);
       b36.setVisible(false);
       b37.setVisible(false);
       b38.setVisible(false);
       b39.setVisible(false);
       b42.setVisible(false);
       b43.setVisible(false);
       g.setColor(Color.black);
  g.setFont(new Font("Times New Roman",Font.ITALIC,65));
       g.drawString("Enter password",400,400);
     
       break;
     }
    case 1:
    {    b1.setVisible(false);
         b2.setVisible(true);
         t1.setVisible(false);
         t2.setVisible(true);
         t3.setVisible(false);
         t4.setVisible(false);

        ///////////smiley
        g.setColor(Color.yellow);
        g.fillOval(840,190,250,250);  
        g.setColor(Color.black);
        g.fillOval(890,270,35,35);
        g.fillOval(1000,270,35,35);  
        for(int i=0;i<9;i++)
        {g.drawArc(900,315,130+i,68+i,180,180);}
     
        g.setColor(Color.black);
        g.setFont(new Font("ALGERIAN",Font.ITALIC,65));
        g.drawString("WELCOME",800,520);
        g.drawString("VISWA DEEP",770,600);    
     
        g.setColor(Color.yellow);
        g.fillOval(320,700,95,95);  
        g.setColor(Color.black);
        g.fillOval(345,726,15,15);
        g.fillOval(380,726,15,15);  
        for(int i=0;i<5;i++){g.drawArc(350,758,28+i,12+i,180,180);}
     
        g.setColor(Color.blue);
        g.setFont(new Font("Times New Roman",Font.ITALIC,35));
        g.drawString("Waiting for your COMMAND BOSS :",445,750);
     
        break;
    }
     
        /////////////////////////////////////////////
        //exceptional case
   
    case 2:
        {
    b1.setVisible(false);
    b2.setVisible(false);
        b3.setVisible(false);
        b4.setVisible(false);
        b5.setVisible(false);
        b6.setVisible(false);
        b7.setVisible(false);
        b8.setVisible(false);
        b9.setVisible(false);
        b10.setVisible(false);
        b11.setVisible(false);
        b12.setVisible(false);
        b13.setVisible(false);
        b14.setVisible(false);
        b15.setVisible(false);
        b16.setVisible(false);
        b17.setVisible(false);
        b18.setVisible(false);
        b19.setVisible(false);
        b20.setVisible(false);
        b21.setVisible(false);
        b22.setVisible(false);
        b23.setVisible(false);
        b24.setVisible(false);
        b25.setVisible(false);
        b26.setVisible(false);
        b27.setVisible(false);
        b27.setVisible(false);
        b28.setVisible(false);
        b29.setVisible(false);
        b30.setVisible(false);
        b31.setVisible(false);
        b32.setVisible(false);
        b33.setVisible(false);
        b34.setVisible(false);
        b35.setVisible(false);
      b36.setVisible(false);
      b37.setVisible(false);
      b38.setVisible(false);
      b39.setVisible(false);
        t1.setVisible(false);
        t1.setVisible(false);
        t3.setVisible(false);
        t4.setVisible(false);
        b42.setVisible(false);
        b43.setVisible(false);
     
    g.setColor(Color.red);
    g.setFont(new Font("Times New Roman",Font.ITALIC,65));
    g.drawString("I think you are not whom I think you are ",520,500);
    g.setColor(Color.yellow);
        g.fillOval(840,190,250,250);  
        g.setColor(Color.black);
        g.fillRoundRect(880, 280, 60, 15, 10, 10);
        g.fillRoundRect(1000, 280, 60, 15, 10, 10);
        g.fillRoundRect(920, 360, 100, 15, 10, 10);
        break;
        }
 
    case 22:
    {
    b1.setVisible(false);
    b2.setVisible(false);
        b3.setVisible(false);
        b4.setVisible(false);
        b5.setVisible(false);
        b6.setVisible(false);
        b7.setVisible(false);
        b8.setVisible(false);
        b9.setVisible(false);
        b10.setVisible(false);
        b11.setVisible(false);
        b12.setVisible(false);
        b13.setVisible(false);
        b14.setVisible(false);
        b15.setVisible(false);
        b16.setVisible(false);
        b17.setVisible(false);
        b18.setVisible(false);
        b19.setVisible(false);
        b20.setVisible(false);
        b21.setVisible(false);
        b22.setVisible(false);
        b23.setVisible(false);
        b24.setVisible(false);
        b25.setVisible(false);
        b26.setVisible(false);
        b27.setVisible(false);
        b27.setVisible(false);
        b28.setVisible(false);
        b29.setVisible(false);
        b30.setVisible(false);
        b31.setVisible(false);
        b32.setVisible(false);
        b33.setVisible(false);
        b34.setVisible(false);
        b35.setVisible(false);
      b36.setVisible(false);
      b37.setVisible(false);
      b38.setVisible(false);
      b42.setVisible(false);
      b43.setVisible(false);
        t1.setVisible(false);
        t1.setVisible(false);
        t3.setVisible(false);
        t4.setVisible(false);

        b39.setVisible(false);

        g.setColor(Color.yellow);
        g.fillOval(640,180,250,250);  
        g.setColor(Color.black);
        g.fillOval(690,260,35,35);
        g.setColor(Color.black);
        g.fillOval(800,260,35,35);  
        g.setColor(Color.black);//1300,435
        for(int i=0;i<9;i++)
        {g.drawArc(700,330,130+i,68+i,0,180);}
        for(int i=0;i<6;i++)
        g.drawArc(700,330+i,130,68,15,165);
     
        g.setColor(Color.red);
    g.setFont(new Font("Times New Roman",Font.BOLD,65));
    g.drawString("Program Terminated ",520,500);
   
    break;
    }
    ///////////////////////////////////////////////
 
    case 3:
    {            t3.setVisible(false);

        t2.setVisible(false);      
        b2.setVisible(false);
        b3.setVisible(true);
        b4.setVisible(true);
     
        g.setColor(Color.yellow);
        g.fillOval(840,190,250,250);  
        g.setColor(Color.black);
        g.fillOval(890,270,35,35);
        g.fillOval(1000,270,35,35);  
        for(int i=0;i<9;i++)
        {g.drawArc(900,315,130+i,68+i,180,180);}
     
        g.setColor(Color.green);
    g.setFont(new Font("Times New Roman",Font.ITALIC,65));
    g.drawString("HELLO Everyone ",520,500);
    g.drawString("GOOD EVENING ",620,600);
   
    g.setColor(Color.yellow);
        g.fillOval(320,700,95,95);  
        g.setColor(Color.black);
        g.fillOval(345,726,15,15);
        g.fillOval(380,726,15,15);  
        for(int i=0;i<5;i++){g.drawArc(350,758,28+i,12+i,180,180);}
     
        g.setColor(Color.blue);
        g.setFont(new Font("Times New Roman",Font.ITALIC,35));
        g.drawString("May I start presentation boss :",445,750);
       break;
    }
 
 
    case 4:
   {
  b3.setVisible(false);
       b4.setVisible(false);
       b5.setVisible(true);
       b6.setVisible(true);

       g.setColor(Color.yellow);
       g.fillOval(420,775,95,95);  
       g.setColor(Color.black);
       g.fillOval(445,801,15,15);
       g.fillOval(480,801,15,15);  
       for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
     
       g.setColor(Color.BLACK);
       g.setFont(new Font("Times New Roman",Font.ITALIC,35));
       g.drawString("May I continue master :",545,840);
     
        g.setColor(Color.red);
      g.setFont(new Font("Times New Roman",Font.BOLD,55));
      g.drawString("Simulation of a Roadmap of Communications between Cell Phones",200,120);
     
      i1=getImage(getDocumentBase(),"mkypts.jpg");
       g.drawImage(i1, 200,200,190,80, null, null);
      g.setColor(Color.blue);
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Communications between Cell Phones ",400,250);
     
      g.drawImage(i1, 200,320,200,80, null, null);
      g.setColor(Color.blue);
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Communications b/w cell phones relies on",400,370);
   
      g.drawImage(i1, 200,440,200,80, null, null);
      g.setColor(Color.blue);
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Handling wireless and mobility",400,490);
   
      g.drawImage(i1, 200,560,200,80, null, null);
      g.setColor(Color.blue);
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Hand-off in micro cell and macro cell",400,600);
   
      g.drawImage(i1, 200,680,200,80, null, null);
      g.setColor(Color.blue);
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Problems encountered and solutions",400,720);
   
      i2=getImage(getDocumentBase(),"cvr.jpg");
    g.drawImage(i2, 1200,200,250,580, null, null);
     
    if(lr<=1)
    {repaint();try {Thread.sleep(99);} catch (InterruptedException e) {e.printStackTrace();}}
   
   lr++;
   break;
   }
    case 5:
   {
  b5.setVisible(false);
       b6.setVisible(false);
       b7.setVisible(true);
       b8.setVisible(true);

       g.setColor(Color.DARK_GRAY);
       g.setFont(new Font("Times New Roman",Font.BOLD,30));
       g.drawString("Communications between Cell Phones",10,120);
       g.setColor(Color.yellow);
       g.fillOval(520,775,95,95);  
       g.setColor(Color.black);
       g.fillOval(545,801,15,15);
       g.fillOval(580,801,15,15);  
       for(int i=0;i<5;i++){g.drawArc(550,833,28+i,12+i,180,180);}
     
       g.setColor(Color.BLACK);
       g.setFont(new Font("Times New Roman",Font.ITALIC,35));
       g.drawString("May I continue master :",645,840);
     
//////////////// mobile
     
g.drawRoundRect(180, 700, 100, 145, 25, 30);
g.drawLine(211, 709, 255, 709);
g.drawLine(211, 710, 255, 710);
g.drawLine(211, 711, 255, 711);
g.drawRoundRect(185, 720, 90, 105, 25, 25);
g.fillOval(220, 823, 25, 23);
    //////////////////

g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

////////////////////////////////////////msc

g.drawRect(650, 300, 100, 120);

g.drawLine(680, 320, 720, 400);
g.drawLine(720, 320, 680, 400);

g.drawLine(680, 320,665, 320);
g.drawLine(720, 320,735, 320);
g.drawLine(680, 400,665,400);
g.drawLine(720, 400, 735, 400);



/////////////////////////////////////////////////////////second

//////////////// mobile
g.drawRoundRect(1580, 700, 100, 145, 25, 30);
g.drawLine(1611, 709, 1655, 709);
g.drawLine(1611, 710, 1655, 710);
g.drawLine(1611, 711, 1655, 711);
g.drawRoundRect(1585, 720, 90, 105, 25, 25);
g.fillOval(1620, 823, 25, 23);
    //////////////////

g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);






g.drawRect(1100, 300, 100, 120);

g.drawLine(1130, 320,1170, 400);
g.drawLine(1170, 320, 1130, 400);

g.drawLine(1130, 320,1115, 320);
g.drawLine(1170, 320,1185, 320);
g.drawLine(1130, 400,1115,400);
g.drawLine(1170, 400,1185, 400);

//////////////////////////////////////////oval
g.setColor(Color.cyan);
g.fillOval(650,50, 600, 200);

////////////////////////////////////////connections
g.setColor(Color.black);
g.fillRect(700, 200, 10, 100);

g.fillRect(1150,200, 10, 100);

g.fillRect(475, 550, 232, 8);
g.fillRect(700, 420, 8, 130);

g.fillRect(1150, 420, 8, 130);
g.fillRect(1150, 550, 275, 8);

g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,30));
g.drawString("Mobile User 1",160,890);
g.drawString("Mobile User 2",1580,890);
g.drawString("Base Station 1",360,630);
g.drawString("Base Station 2",1380,630);

g.drawString("Mobile Switching ",800,350);
g.drawString("Centers ",850,400);

g.drawString("Public Network ",820,150);
break;
   }
 
 
    case 6:
   {   b7.setVisible(false);
           b8.setVisible(false);
           b9.setVisible(true);
           b10.setVisible(true);
           b11.setVisible(true);


  g.setColor(Color.yellow);
       g.fillOval(520,775,95,95);  
       g.setColor(Color.black);
       g.fillOval(545,801,15,15);
       g.fillOval(580,801,15,15);  
       for(int i=0;i<5;i++){g.drawArc(550,833,28+i,12+i,180,180);}
     
       g.setColor(Color.BLACK);
       g.setFont(new Font("Times New Roman",Font.ITALIC,35));
       g.drawString("May I continue master :",645,840);
     
//////////////// mobile
     
g.drawRoundRect(180, 700, 100, 145, 25, 30);
g.drawLine(211, 709, 255, 709);
g.drawLine(211, 710, 255, 710);
g.drawLine(211, 711, 255, 711);
g.drawRoundRect(185, 720, 90, 105, 25, 25);
g.fillOval(220, 823, 25, 23);
    //////////////////

g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

////////////////////////////////////////msc

g.drawRect(650, 300, 100, 120);

g.drawLine(680, 320, 720, 400);
g.drawLine(720, 320, 680, 400);

g.drawLine(680, 320,665, 320);
g.drawLine(720, 320,735, 320);
g.drawLine(680, 400,665,400);
g.drawLine(720, 400, 735, 400);



/////////////////////////////////////////////////////////second

//////////////// mobile
g.drawRoundRect(1580, 700, 100, 145, 25, 30);
g.drawLine(1611, 709, 1655, 709);
g.drawLine(1611, 710, 1655, 710);
g.drawLine(1611, 711, 1655, 711);
g.drawRoundRect(1585, 720, 90, 105, 25, 25);
g.fillOval(1620, 823, 25, 23);
    //////////////////

g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);






g.drawRect(1100, 300, 100, 120);

g.drawLine(1130, 320,1170, 400);
g.drawLine(1170, 320, 1130, 400);

g.drawLine(1130, 320,1115, 320);
g.drawLine(1170, 320,1185, 320);
g.drawLine(1130, 400,1115,400);
g.drawLine(1170, 400,1185, 400);

//////////////////////////////////////////oval
g.setColor(Color.cyan);
g.fillOval(650,50, 600, 200);

////////////////////////////////////////connections
g.setColor(Color.black);
g.fillRect(700, 200, 10, 100);

g.fillRect(1150,200, 10, 100);

g.fillRect(475, 550, 232, 8);
g.fillRect(700, 420, 8, 130);

g.fillRect(1150, 420, 8, 130);
g.fillRect(1150, 550, 275, 8);

g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,30));
g.drawString("Mobile User 1",160,890);
g.drawString("Mobile User 2",1580,890);
g.drawString("Base Station 1",360,630);
g.drawString("Base Station 2",1380,630);

g.drawString("Mobile Switching ",800,350);
g.drawString("Centers ",850,400);

g.drawString("Public Network ",820,150);
//////////////////////stimulation
g.setColor(Color.blue);
g.drawString("Tr to",195,760);
g.drawString("BST",205,800);

for(int i=0;i<4;i++)
{
g.setColor(Color.blue);
g.drawArc(220, 690, 20, 10, 0, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}  
g.drawArc(210, 670, 40, 22, 0, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.drawArc(200, 650, 60, 34, 0, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.drawArc(190, 630, 80, 46, 0, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}

g.setColor(Color.white);
g.drawArc(220, 690, 20, 10, 0, 180);
g.drawArc(210, 670, 40, 22, 0, 180);
g.drawArc(200, 650, 60, 34, 0, 180);
g.drawArc(190, 630, 80, 46, 0, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}

if(i==3)
{
g.setColor(Color.blue);
    g.drawArc(220, 690, 20, 10, 0, 180);
    try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}  
    g.drawArc(210, 670, 40, 22, 0, 180);
    try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
    g.drawArc(200, 650, 60, 34, 0, 180);
    try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
    g.drawArc(190, 630, 80, 46, 0, 180);
    try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
break;

}
    }
g.setFont(new Font("Times New Roman",Font.BOLD,27));
g.setColor(Color.white);
g.fillRoundRect(187, 722, 85, 100, 25, 25);
g.setColor(Color.blue);
g.drawString("BST to",193,763);
g.drawString("MSC",205,800);
g.setColor(Color.green);

for(int i=0;i<232;i++)
{
g.drawLine(475+i, 550, 475+i, 558);
try {Thread.sleep(8);} catch (InterruptedException e) {e.printStackTrace();}
}
for(int i=0;i<132;i++)
{
g.drawLine(700, 550-i,708, 550-i);
try {Thread.sleep(8);} catch (InterruptedException e) {e.printStackTrace();}
}

g.setColor(Color.white);
g.fillRoundRect(187, 722, 85, 100, 25, 25);
g.setColor(Color.blue);
g.setFont(new Font("Times New Roman",Font.BOLD,25));

g.drawString("MSC to",193,763);
g.drawString("PN",205,800);
g.setColor(Color.green);
for(int i=0;i<103;i++)
{
g.drawLine(700, 300-i,710,300-i);
try {Thread.sleep(12);} catch (InterruptedException e) {e.printStackTrace();}
}
/////////////////////////////////////////2 cnd phase

g.setColor(Color.white);
g.fillRoundRect(187, 722, 85, 100, 25, 25);
g.setColor(Color.blue);
g.setFont(new Font("Times New Roman",Font.BOLD,25));
g.drawString("PN2 to",193,763);
g.drawString("MSC 2",200,800);
g.setColor(Color.green);


for(int i=0;i<100;i++)
{
g.drawLine(1150, 200+i,1160, 200+i);
try {Thread.sleep(12);} catch (InterruptedException e) {e.printStackTrace();}
}
g.setColor(Color.white);
g.fillRoundRect(187, 722, 85, 100, 25, 25);
g.setColor(Color.blue);
g.setFont(new Font("Times New Roman",Font.BOLD,20));
g.drawString("MSC2 to",193,763);
g.drawString("BST 2",205,800);
g.setColor(Color.green);

for(int i=0;i<132;i++)
{
g.drawLine(1150, 420+i,1158, 420+i);
try {Thread.sleep(8);} catch (InterruptedException e) {e.printStackTrace();}
}
for(int i=0;i<280;i++)
{
g.drawLine(1150+i, 550,1150+i, 558);
try {Thread.sleep(8);} catch (InterruptedException e) {e.printStackTrace();}
}
g.setColor(Color.white);
g.fillRoundRect(187, 722, 85, 100, 25, 25);
g.setColor(Color.blue);
g.setFont(new Font("Times New Roman",Font.BOLD,20));
g.drawString("BST 2 to",193,763);
g.drawString("User 2",205,800);
g.setColor(Color.green);
for(int i=0;i<4;i++)
{
    g.setColor(Color.blue);

g.drawArc(1390, 480, 10, 20, 90, 180);
g.drawArc(1491, 480, 10, 20, 270, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.drawArc(1370, 470, 20, 40, 90, 180);
g.drawArc(1501, 470, 20, 40, 270, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.drawArc(1350, 460, 30, 60, 90, 180);
g.drawArc(1521, 460, 30, 60, 270, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.setColor(Color.white);
g.drawArc(1390, 480, 10, 20, 90, 180);
g.drawArc(1370, 470, 20, 40, 90, 180);
g.drawArc(1350, 460, 30, 60, 90, 180);

g.drawArc(1491, 480, 10, 20, 270, 180);
g.drawArc(1501, 470, 20, 40, 270, 180);
g.drawArc(1521, 460, 30, 60, 270, 180);

try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}

if(i==3)
{        g.setColor(Color.blue);

g.drawArc(1390, 480, 10, 20, 90, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.drawArc(1370, 470, 20, 40, 90, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.drawArc(1350, 460, 30, 60, 90, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.drawArc(1491, 480, 10, 20, 270, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.drawArc(1501, 470, 20, 40, 270, 180);
try {Thread.sleep(80);} catch (InterruptedException e) {e.printStackTrace();}
g.drawArc(1521, 460, 30, 60, 270, 180);
break;}
}
g.setColor(Color.white);
g.fillRoundRect(187, 722, 85, 100, 25, 25);
g.setColor(Color.blue);
g.setFont(new Font("Times New Roman",Font.BOLD,20));
g.drawString("User 2",205,770);
g.setColor(Color.green);

g.setColor(Color.blue);
g.setFont(new Font("Times New Roman",Font.BOLD,20));
g.drawString("calling",1605,800);
g.drawString("User 1",1593,763);

   }
   break;
    }
   
    if(j1==7)
    {
    b9.setVisible(false);
        b10.setVisible(false);
        b11.setVisible(false);
        b12.setVisible(true);
        b13.setVisible(true);
        b14.setVisible(true);

        g.setColor(Color.yellow);
        g.fillOval(420,775,95,95);  
        g.setColor(Color.black);
        g.fillOval(445,801,15,15);
        g.fillOval(480,801,15,15);  
        for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
     
        g.setColor(Color.BLACK);
        g.setFont(new Font("Times New Roman",Font.ITALIC,35));
        g.drawString("May I continue master :",545,840);
   
    i1=getImage(getDocumentBase(),"satellite.jpg");
           g.drawImage(i1, 200,10,1600,750, null, null);
    if(lrr<=1)
    {repaint();try {Thread.sleep(99);} catch (InterruptedException e) {e.printStackTrace();}}
   
    lrr++;
     
    }
    if(j1==8)
    {
    g.setColor(Color.yellow);
        g.fillOval(420,775,95,95);  
        g.setColor(Color.black);
        g.fillOval(445,801,15,15);
        g.fillOval(480,801,15,15);  
        for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
     
        g.setColor(Color.BLACK);
        g.setFont(new Font("Times New Roman",Font.ITALIC,35));
        g.drawString("May I continue master :",545,840);
   
    b12.setVisible(false);
        b13.setVisible(false);
        b14.setVisible(false);
     
        for(int i1=0;i1<1000;i1++)
         {
          g.drawLine(0, i1, 1950, i1);
         try {Thread.sleep(1);} catch (InterruptedException e) {e.printStackTrace();}
          }
   
        b15.setVisible(true);
        b16.setVisible(true);
        b17.setVisible(true);
        b18.setVisible(true);
        b19.setVisible(true);
        b20.setVisible(true);
        b21.setVisible(true);

        g.setColor(Color.red);

        g.setFont(new Font("Times New Roman",Font.BOLD,75));
      g.drawString("communications between cell phones rely on",200,120);
        g.setColor(Color.green);

        g.setColor(Color.yellow);
        g.fillOval(520,775,95,95);  
        g.setColor(Color.black);
        g.fillOval(545,801,15,15);
        g.fillOval(580,801,15,15);  
        for(int i=0;i<5;i++){g.drawArc(550,833,28+i,12+i,180,180);}
     
        g.setColor(Color.white);
        g.setFont(new Font("Times New Roman",Font.ITALIC,35));
        g.drawString("May I continue master :",645,840);
    }
 
    //////////////////////ast
    if(j1==9)
    {
    b15.setVisible(false);
        b16.setVisible(false);
        b17.setVisible(false);
        b18.setVisible(false);
        b19.setVisible(false);
        b20.setVisible(false);
        b21.setVisible(false);
           
        b22.setVisible(true);

        i1=getImage(getDocumentBase(),"phone.jpg");
       g.drawImage(i1, 200,10,1200,750, null, null);
    if(l1<=1)
  {repaint();try {Thread.sleep(99);} catch (InterruptedException e) {e.printStackTrace();}}
 
 l1++;

    }
 
    if(j1==10)
    {
    b15.setVisible(false);
        b16.setVisible(false);
        b17.setVisible(false);
        b18.setVisible(false);
        b19.setVisible(false);
        b20.setVisible(false);
        b21.setVisible(false);    
        b22.setVisible(true);

        i1=getImage(getDocumentBase(),"bs.jpg");
       g.drawImage(i1, 200,10,1200,750, null, null);
    if(l2<=1)
  {repaint();try {Thread.sleep(99);} catch (InterruptedException e) {e.printStackTrace();}}
 
 l2++;

    }
    if(j1==11)
    {
    b15.setVisible(false);
        b16.setVisible(false);
        b17.setVisible(false);
        b18.setVisible(false);
        b19.setVisible(false);
        b20.setVisible(false);
        b21.setVisible(false);
     
        g.setColor(Color.red);
      g.setFont(new Font("Times New Roman",Font.BOLD,55));
      g.drawString("Funtions of MSC",200,120);
     
     
      g.setColor(Color.BLUE);
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Interworking functions via Gateway ",400,250);
     
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Performs call set-up, release and routing",400,370);
   
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Coordinates the activities of all the base stations",400,490);
   
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Connect the entire cellular system to the PSTN",400,600);
   
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Routing call to vistor Location",400,720);
   
     
     
     
    }
    if(j1==12)
    {b15.setVisible(false);
    b16.setVisible(false);
    b17.setVisible(false);
    b18.setVisible(false);
    b19.setVisible(false);
    b20.setVisible(false);
    b21.setVisible(false);

    i1=getImage(getDocumentBase(),"multipath.jpg");
       g.drawImage(i1, 200,10,1200,750, null, null);
    if(l3<=1)
  {repaint();try {Thread.sleep(99);} catch (InterruptedException e) {e.printStackTrace();}}
 
 l3++;
    }
    if(j1==13)
    {
    b15.setVisible(false);
        b16.setVisible(false);
        b17.setVisible(false);
        b18.setVisible(false);
        b19.setVisible(false);
        b20.setVisible(false);
        b21.setVisible(false);
        b22.setVisible(false);
        b23.setVisible(true);

        t3.setVisible(true);

        g.setColor(Color.red);
    g.setFont(new Font("Times New Roman",Font.ITALIC,65));
    g.drawString("I think you are not whom I think you are ",520,500);
    g.setColor(Color.yellow);
        g.fillOval(840,190,250,250);  
        g.setColor(Color.black);
        g.fillRoundRect(880, 280, 60, 15, 10, 10);
        g.fillRoundRect(1000, 280, 60, 15, 10, 10);
        g.fillRoundRect(920, 360, 100, 15, 10, 10);
     
        g.drawString("So Please answer to this question ",520,600);
        g.drawString("From where Sky starts ?",520,700);    }

    if(j1==14)
    {b23.setVisible(false);

    t3.setVisible(false);
 
    b24.setVisible(true);
    b25.setVisible(true);

g.setColor(Color.red);
  g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Hard Hand-Off",200,120);
 
g.setColor(Color.cyan);
g.fillOval(100, 300, 850, 500);

g.setColor(Color.black);
g.fillOval(950, 300, 850, 500);

///////////////////antena 1

g.setColor(Color.black);
g.setFont(new Font("Times New Roman",Font.ITALIC,65));
g.drawString("f1",400,400);
g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

//////////////////////////////
g.setColor(Color.white);
  g.setFont(new Font("Times New Roman",Font.ITALIC,65));
  g.drawString("f2",1450,400);
g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);

///////////////////////////////////////////
g.setColor(Color.red);
g.fillRect(650,530,60,20);
g.fillRect(600,550,130,30);          ///////////CAR IN LEFT REGIN
g.fillOval(640, 578, 25, 25);
g.fillOval(695, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f1",650,500);
}

if(j1==15)
{
g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Hard Hand-Off",200,120);

g.setColor(Color.cyan);
g.fillOval(100, 300, 850, 500);

g.setColor(Color.black);
g.fillOval(950, 300, 850, 500);

///////////////////antena 1

g.setColor(Color.black);
g.setFont(new Font("Times New Roman",Font.ITALIC,65));
   g.drawString("f1",400,400);
g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

//////////////////////////////
g.setColor(Color.white);
  g.setFont(new Font("Times New Roman",Font.ITALIC,65));
      g.drawString("f2",1450,400);
g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);

///////////////////////////////////////////
g.setColor(Color.red);
g.fillRect(650,530,60,20);
g.fillRect(600,550,130,30);          ///////////CAR IN LEFT REGIN
g.fillOval(640, 578, 25, 25);
g.fillOval(695, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
   g.drawString("f1",650,500);
//////////////////car movement 1 start

for(int i=0;i<211;i++)
{

g.setColor(Color.red);
g.fillRect(650+i,530,60,20);
g.fillRect(600+i,550,130,30);
g.fillOval(640+i, 578, 25, 25);
g.fillOval(695+i, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
   g.drawString("f1",650+i,500);
   try {Thread.sleep(4);} catch (InterruptedException e) {e.printStackTrace();}
   g.setColor(Color.cyan);
g.fillRect(650+i,530,60,20);
g.fillRect(600+i,550,130,30);
g.fillOval(640+i, 578, 25, 25);
g.fillOval(695+i, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
   g.drawString("f1",650+i,500);
   try {Thread.sleep(1);} catch (InterruptedException e) {e.printStackTrace();}
 
   if(i==210)
   {
    g.setColor(Color.RED);
g.fillRect(650+i,530,60,20);
g.fillRect(600+i,550,130,30);
g.fillOval(640+i, 578, 25, 25);
g.fillOval(695+i, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
   g.drawString("f1",650+i,500);
   }

}
//////////////////car movement 1 stop
}
if(j1==16)
{
g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Hard Hand-Off",200,120);

g.setColor(Color.cyan);
g.fillOval(100, 300, 850, 500);

g.setColor(Color.black);
g.fillOval(950, 300, 850, 500);

///////////////////antena 1

g.setColor(Color.black);
g.setFont(new Font("Times New Roman",Font.ITALIC,65));
   g.drawString("f1",400,400);
g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

//////////////////////////////
g.setColor(Color.white);
  g.setFont(new Font("Times New Roman",Font.ITALIC,65));
      g.drawString("f2",1450,400);
g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);
   g.setColor(Color.red);
g.fillRect(1000,530,60,20);
g.fillRect(950,550,130,30);
g.fillOval(990, 578, 25, 25);
g.fillOval(1045, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
   g.drawString("f2",1000,500);
//////////////////car movement 2 start
   g.setColor(Color.yellow);
      g.fillOval(420,775,95,95);  
      g.setColor(Color.black);
      g.fillOval(445,801,15,15);
      g.fillOval(480,801,15,15);  
      for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
   
      g.setColor(Color.BLACK);
      g.setFont(new Font("Times New Roman",Font.ITALIC,35));
      g.drawString("May I continue master :",545,840);
   
      b26.setVisible(true);
      b27.setVisible(true);
}
if(j1==17)
{  b24.setVisible(false);
      b25.setVisible(false);
      b26.setVisible(false);
      b27.setVisible(false);

      b28.setVisible(true);
      b29.setVisible(true);
      b30.setVisible(true);
      g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Soft Hand-Off",200,120);
 
  g.setColor(Color.cyan);
g.fillOval(110, 300, 1000, 500);

g.setColor(Color.black);
g.fillOval(840, 300, 1000, 500);


///////////////////antena 1

g.setColor(Color.black);
g.setFont(new Font("Times New Roman",Font.ITALIC,65));
g.drawString("f1",400,400);
g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

//////////////////////////////
g.setColor(Color.white);
  g.setFont(new Font("Times New Roman",Font.ITALIC,65));
  g.drawString("f2",1450,400);
g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);

///////////////////////////////////////////
g.setColor(Color.red);
g.fillRect(620,530,60,20);
g.fillRect(570,550,130,30);          ///////////CAR IN LEFT REGIN
g.fillOval(610, 578, 25, 25);
g.fillOval(665, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f1",620,500);
}
if(j1==18)
{
g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Soft Hand-Off",200,120);
 
  g.setColor(Color.cyan);
g.fillOval(110, 300, 1000, 500);

g.setColor(Color.black);
g.fillOval(840, 300, 1000, 500);


///////////////////antena 1

g.setColor(Color.black);
g.setFont(new Font("Times New Roman",Font.ITALIC,65));
g.drawString("f1",400,400);
g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

//////////////////////////////
g.setColor(Color.white);
  g.setFont(new Font("Times New Roman",Font.ITALIC,65));
  g.drawString("f2",1450,400);
g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);

///////////////////////////////////////////
for(int i=0;i<140;i++)
{
g.setColor(Color.red);
g.fillRect(620+i,530,60,20);
g.fillRect(570+i,550,130,30);          ///////////CAR IN LEFT movement
g.fillOval(610+i, 578, 25, 25);
g.fillOval(665+i, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f1",620+i,500);

   try {Thread.sleep(4);} catch (InterruptedException e) {e.printStackTrace();}
   g.setColor(Color.cyan);
g.fillRect(620+i,530,60,20);
g.fillRect(570+i,550,130,30);          ///////////CAR IN LEFT movement
g.fillOval(610+i, 578, 25, 25);
g.fillOval(665+i, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f1",620+i,500);
   try {Thread.sleep(2);} catch (InterruptedException e) {e.printStackTrace();}

   if(i==139)
   {g.setColor(Color.red);
g.fillRect(620+i,530,60,20);
g.fillRect(570+i,550,130,30);          ///////////CAR IN LEFT movement
g.fillOval(610+i, 578, 25, 25);
g.fillOval(665+i, 578, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f1",620+i,500);
}
}
}

if(j1==19)
{
g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Soft Hand-Off",200,120);
 
  g.setColor(Color.cyan);
g.fillOval(110, 300, 1000, 500);

g.setColor(Color.black);
g.fillOval(840, 300, 1000, 500);


///////////////////antena 1

g.setColor(Color.black);
g.setFont(new Font("Times New Roman",Font.ITALIC,65));
g.drawString("f1",400,400);
g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

//////////////////////////////
g.setColor(Color.white);
  g.setFont(new Font("Times New Roman",Font.ITALIC,65));
  g.drawString("f2",1450,400);
g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);

///////////////////car f1 &f2
g.setColor(Color.red);
g.fillRect(930,520,60,20);
g.fillRect(890,540,130,30);          ///////////CAR IN LEFT movement
g.fillOval(920, 568, 25, 25);
g.fillOval(975, 568, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f1",920,500);
g.drawString("f2",960,500);
}
if(j1==20)
{    g.setColor(Color.yellow);
      g.fillOval(420,775,95,95);  
      g.setColor(Color.black);
      g.fillOval(445,801,15,15);
      g.fillOval(480,801,15,15);  
      for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
   
      g.setColor(Color.BLACK);
      g.setFont(new Font("Times New Roman",Font.ITALIC,35));
      g.drawString("May I continue master :",545,840);
   
      b31.setVisible(true);
      b32.setVisible(true);
g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Soft Hand-Off",200,120);
 
  g.setColor(Color.cyan);
g.fillOval(110, 300, 1000, 500);

g.setColor(Color.black);
g.fillOval(840, 300, 1000, 500);


///////////////////antena 1

g.setColor(Color.black);
g.setFont(new Font("Times New Roman",Font.ITALIC,65));
g.drawString("f1",400,400);
g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

//////////////////////////////
g.setColor(Color.white);
  g.setFont(new Font("Times New Roman",Font.ITALIC,65));
  g.drawString("f2",1450,400);
g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);

///////////////////car f1 &f2
for(int i=0;i<90;i++)
{
g.setColor(Color.red);
g.fillRect(1130+i,520,60,20);
g.fillRect(1090+i,540,130,30);          ///////////CAR IN f2 g.fillOval(920, 568, 25, 25);
g.fillOval(1175+i, 568, 25, 25);
g.fillOval(1120+i, 568, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f2",1120+i,500);
   try {Thread.sleep(4);} catch (InterruptedException e) {e.printStackTrace();}

g.setColor(Color.black);
g.fillRect(1130+i,520,60,20);
g.fillRect(1090+i,540,130,30);          ///////////CAR IN f2 g.fillOval(920, 568, 25, 25);
g.fillOval(1175+i, 568, 25, 25);
g.fillOval(1120+i, 568, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f2",1120+i,500);
   try {Thread.sleep(4);} catch (InterruptedException e) {e.printStackTrace();}
 
   if(i==89)
   {g.setColor(Color.red);
g.fillRect(1130+i,520,60,20);
g.fillRect(1090+i,540,130,30);          ///////////CAR IN f2 g.fillOval(920, 568, 25, 25);
g.fillOval(1175+i, 568, 25, 25);
g.fillOval(1120+i, 568, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f2",1120+i,500); }

}
}
if(j1==21)
{
  b28.setVisible(false);
      b29.setVisible(false);
      b30.setVisible(false);
      b31.setVisible(false);
      b32.setVisible(false);
   
g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Soft Hand-Off",200,120);
 
  g.setColor(Color.cyan);
g.fillOval(110, 300, 1000, 500);

g.setColor(Color.black);
g.fillOval(840, 300, 1000, 500);


///////////////////antena 1

g.setColor(Color.black);
g.setFont(new Font("Times New Roman",Font.ITALIC,65));
g.drawString("f1",400,400);
g.drawLine(450, 500, 450, 610);
g.drawLine(450, 500, 400, 600);
g.drawLine(450, 500, 500, 600);
g.drawLine(400, 600,450, 610);
g.drawLine(500, 600,450, 610);

g.drawLine(440,520,450,522);
g.drawLine(430,540,450,544);
g.drawLine(420,560,450,566);
g.drawLine(410,580,450,588);

g.drawLine(460,520,450,522);
g.drawLine(470,540,450,544);
g.drawLine(480,560,450,566);
g.drawLine(490,580,450,588);

//rec
g.fillRect(446, 470, 6, 30);
g.fillRect(452, 450, 6, 30);

g.fillRect(450,494,30,6);
g.fillRect(465, 488, 30,6);

g.fillRect(415,494,30,6);
g.fillRect(400, 488, 30,6);

//////////////////////////////
g.setColor(Color.white);
  g.setFont(new Font("Times New Roman",Font.ITALIC,65));
  g.drawString("f2",1450,400);
g.drawLine(1450, 500, 1450, 610);
g.drawLine(1450, 500, 1400, 600);
g.drawLine(1450, 500, 1500, 600);
g.drawLine(1400, 600,1450, 610);
g.drawLine(1500, 600,1450, 610);

g.drawLine(1440,520,1450,522);
g.drawLine(1430,540,1450,544);
g.drawLine(1420,560,1450,566);
g.drawLine(1410,580,1450,588);

g.drawLine(1460,520,1450,522);
g.drawLine(1470,540,1450,544);
g.drawLine(1480,560,1450,566);
g.drawLine(1490,580,1450,588);

//rec
g.fillRect(1446, 470, 6, 30);
g.fillRect(1452, 450, 6, 30);

g.fillRect(1450,494,30,6);
g.fillRect(1465, 488, 30,6);

g.fillRect(1415,494,30,6);
g.fillRect(1400, 488, 30,6);

///////////////////car f1 &f2

g.setColor(Color.red);
g.fillRect(1130,520,60,20);
g.fillRect(1090,540,130,30);          ///////////CAR IN f2 g.fillOval(920, 568, 25, 25);
g.fillOval(1175, 568, 25, 25);
g.fillOval(1120, 568, 25, 25);
g.setFont(new Font("Times New Roman",Font.ITALIC,40));
g.drawString("f2",1120,500);



for(int i=0;i<962;i++)
{g.setColor(Color.blue);
g.drawLine(i, 0,i, 1000);
   try {Thread.sleep(2);} catch (InterruptedException e) {e.printStackTrace();}
g.drawLine(1920-i, 0,1920-i, 1000);

}

for(int i=0;i<962;i++)
{g.setColor(Color.white);
g.drawLine(961-i, 0,961-i, 1000);
   try {Thread.sleep(1);} catch (InterruptedException e) {e.printStackTrace();}
g.drawLine(959+i, 0,959+i, 1000);

}
                setBackground(Color.white);

g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Cellular Design",200,120);
g.setColor(Color.black);
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Types OF cell based on size",400,250);
g.setColor(Color.blue);
      g.drawString("1] Micro Cell",400,350);
      g.drawString("2] Macro cell",400,400);
     
      g.setColor(Color.black);
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("cellular Structures",500,550);
g.setColor(Color.blue);
      g.drawString("1] circular",400,650);
      g.drawString("2] Hexagonal",400,700);
      g.drawString("2] Square",400,750);

      g.setColor(Color.yellow);
      g.fillOval(420,775,95,95);  
      g.setColor(Color.black);
      g.fillOval(445,801,15,15);
      g.fillOval(480,801,15,15);  
      for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
   
      g.setColor(Color.BLACK);
      g.setFont(new Font("Times New Roman",Font.ITALIC,35));
      g.drawString("May I continue master :",545,840);
      b33.setVisible(true);
      b34.setVisible(true);
}
if(j1==23)
{
  b33.setVisible(false);
      b34.setVisible(false);
   
      b35.setVisible(true);
      b36.setVisible(true);
   
      g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,55));
  g.drawString("Problems faced at time on making Project and their solutions",200,120);
g.setColor(Color.black);
      g.setFont(new Font("Bradley Hand ITC",Font.BOLD,45));
      g.drawString("Problem 1:-In reality length of antenas and radius of cells is high ",150,250);
      g.drawString("which is impossible to design in programming virtually",340,300);
g.setColor(Color.blue);
      g.drawString("Solution 1:- I used scaling where 1km = 15 cm",150,360);
g.setColor(Color.black);

      g.drawString("Problem 2:-Generally Macro cell radius ranges from 10-12 km and Micro cell ",150,500);
      g.drawString("has radius of 1-1.5 km. What happens if user selects 50 micro cells/Macro cell ?",150,550);
g.setColor(Color.blue);

      g.drawString("Solution 2:- I Considered maximum number of micro cells per macro cell is 10",150,630);
     
      g.setColor(Color.yellow);
      g.fillOval(420,775,95,95);  
      g.setColor(Color.black);
      g.fillOval(445,801,15,15);
      g.fillOval(480,801,15,15);  
      for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
   
      g.setColor(Color.BLACK);
      g.setFont(new Font("Times New Roman",Font.ITALIC,35));
      g.drawString("May I continue Boss :",545,840);
}

if(j1==24)
{
  b35.setVisible(false);
      b36.setVisible(false);
   
      g.setColor(Color.red);
    g.setFont(new Font("Times New Roman",Font.ITALIC,65));
    g.drawString("Your highness we are running short of time ",520,500);
    g.setColor(Color.yellow);
       g.fillOval(840,190,250,250);  
       g.setColor(Color.black);
       g.fillRoundRect(880, 280, 60, 15, 10, 10);
       g.fillRoundRect(1000, 280, 60, 15, 10, 10);
       g.fillRoundRect(920, 360, 100, 15, 10, 10);
     
       g.setColor(Color.yellow);
      g.fillOval(420,775,95,95);  
      g.setColor(Color.black);
      g.fillOval(445,801,15,15);
      g.fillOval(480,801,15,15);  
      for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
   
      g.setColor(Color.BLACK);
      g.setFont(new Font("Times New Roman",Font.ITALIC,35));
      g.drawString("May I continue Boss :",545,840);
      b37.setVisible(true);
      b38.setVisible(true);
}
if(j1==25)
{
b37.setVisible(false);
   b38.setVisible(false);
   b42.setVisible(true);
   b43.setVisible(true);
   g.setColor(Color.red);
      g.setFont(new Font("Times New Roman",Font.ITALIC,35));
      g.drawString("Lay out of the Product :",20,40);
   i1=getImage(getDocumentBase(),"layout.jpg");
     g.drawImage(i1, 100,150,1800,700, null, null);
  if(l4<=1)
{repaint();try {Thread.sleep(99);} catch (InterruptedException e) {e.printStackTrace();}}

l4++;
g.setColor(Color.yellow);
     g.fillOval(420,775,95,95);  
     g.setColor(Color.black);
     g.fillOval(445,801,15,15);
     g.fillOval(480,801,15,15);  
     for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
   
     g.setColor(Color.BLACK);
     g.setFont(new Font("Times New Roman",Font.ITALIC,35));
     g.drawString("May I continue Boss :",545,840);
 
}
if(j1==26)
{  b42.setVisible(false);
      b43.setVisible(false);
   
      g.setColor(Color.red);
g.setFont(new Font("Times New Roman",Font.BOLD,45));
  g.drawString("CONCLUSION",200,120);

g.setColor(Color.blue);

  g.drawString("Hence mobile communication not only relies on end Systems ",300,420);
  g.drawString("but also on Infrastructure like Base station and MSC ",300,520);
  g.drawString("Based on this idea entire project is build ",450,620);
 
  g.setColor(Color.yellow);
      g.fillOval(420,775,95,95);  
      g.setColor(Color.black);
      g.fillOval(445,801,15,15);
      g.fillOval(480,801,15,15);  
      for(int i=0;i<5;i++){g.drawArc(450,833,28+i,12+i,180,180);}
   
      g.setColor(Color.BLACK);
      g.setFont(new Font("Times New Roman",Font.ITALIC,35));
      g.drawString("we are done boss, command Please: :",545,840);
      b39.setVisible(true);
      t4.setVisible(true);
   

}
if(j1==27)
{
b39.setVisible(false);
      t4.setVisible(false);
     
       g.setColor(Color.yellow);
       g.fillOval(840,190,250,250);  
       g.setColor(Color.black);
       g.fillOval(890,270,35,35);
       g.fillOval(1000,270,35,35);  
       for(int i=0;i<9;i++)
       {g.drawArc(900,315,130+i,68+i,180,180);}
     
       g.setColor(Color.blue);
    g.setFont(new Font("Times New Roman",Font.ITALIC,65));
    g.drawString("THANK YOU ALL",520,500);
    g.drawString("HAVE A GREAT DAY ",620,600);
   

}


}

@Override
public void actionPerformed(ActionEvent ae)
{

if (ae.getSource() == b1)
{String s1 =  t1.getText();
int a=Integer.parseInt(s1);
if(a==700646591){j1=1;}
else{j1=2;}
repaint();
}

if (ae.getSource() == b2)
{
/*String s1="say hello to all";
   String s2 = t2.getText().toString();
   if(s1.equals(s2))
   {
j1=3;repaint();
}else {j1=2;repaint();}*/
j1=3;repaint();

}
if (ae.getSource() == b3)
{
j1=4;
repaint();
}
if (ae.getSource() == b4)
{
j1=22;
repaint();
}
if (ae.getSource() == b5)
{
j1=5;
repaint();
}
if (ae.getSource() == b6)
{
j1=22;
repaint();
}
if (ae.getSource() == b7)
{
j1=6;
repaint();
}
if (ae.getSource() == b8)
{
j1=22;
repaint();
}
if (ae.getSource() == b9)
{
j1=7;
repaint();
}
if (ae.getSource() == b10)
{
j1=22;
repaint();
}
if (ae.getSource() == b11)
{
j1=5;
repaint();
}
if (ae.getSource() == b12)
{
j1=8;
repaint();
}
if (ae.getSource() == b13)
{
j1=22;
repaint();
}
if (ae.getSource() == b14)
{
j1=6;
repaint();
}
if (ae.getSource() == b15)
{
j1=13;//next page
repaint();
}
if (ae.getSource() == b16)
{
j1=22;
repaint();
}
if (ae.getSource() == b17)
{
j1=7;
repaint();
}

if (ae.getSource() == b18)
{
j1=9;
repaint();
}
if (ae.getSource() == b19)
{
j1=10;
repaint();
}
if (ae.getSource() == b20)
{
j1=11;
repaint();
}
if (ae.getSource() == b21)
{
j1=12;
repaint();
}
if (ae.getSource() == b22)
{
j1=8;
repaint();
}
if (ae.getSource() == b23)
{
j1=14;
repaint();
}
if (ae.getSource() == b24)
{
j1=16;
repaint();
}
if (ae.getSource() == b25)
{
j1=15;
repaint();
}
if (ae.getSource() == b26)
{
j1=17;
repaint();
}
if (ae.getSource() == b27)
{
j1=22;
repaint();
}
if (ae.getSource() == b28)
{
j1=18;
repaint();
}
if (ae.getSource() == b29)
{
j1=19;
repaint();
}
if (ae.getSource() == b30)
{
j1=20;
repaint();
}
if (ae.getSource() == b31)
{
j1=21;
repaint();
}
if (ae.getSource() == b32)
{
j1=22;
repaint();
}
if (ae.getSource() == b33)
{
j1=23;
repaint();
}
if (ae.getSource() == b34)
{
j1=22;
repaint();
}
if (ae.getSource() == b35)
{
j1=24;
repaint();
}
if (ae.getSource() == b36)
{
j1=22;
repaint();
}
if (ae.getSource() == b37)
{
j1=25;
repaint();
}
if (ae.getSource() == b38)
{
j1=22;
repaint();
}
if (ae.getSource() == b42)
{
j1=26;
repaint();
}
if (ae.getSource() == b43)
{
j1=22;
repaint();
}
if (ae.getSource() == b39)
{
j1=27;
repaint();
}

}
public void itemStateChanged(ItemEvent e) {
// TODO Auto-generated method stub

}
}
   

Friday, 19 June 2015

Analog Clock program in java

1]. Seconds hand completes 360 degrees in 1 minute.
2]. Minute hand completes 360 degrees in 1 hour.
3]. Hour hand completes 360 degrees in 12 hours.
4]. Set of points traced by circle is given by :
                                                        x=cx+r*angle; y=cy+r*angle;
# (cx,cy)=coordinates of centre of circle.
# r= radius.
                                      => i.e path traced by minute and seconds hands in same.

                                      =>Where as hour hand cover 5 degrees when minute hand sweeps 360 degrees.(360/5=12 used in looping).





                                                                                      ......................HAPPY CODING

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

import java.applet.Applet;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.util.Random;
public class WallClock extends Applet implements Runnable {
Thread ct= null ;
int cx=330,cy=230,rs=100,rm=75,rh=55,pxs,pys,pxm,pym,pxh,pyh;int  ts=0,tm=0,th=0;float cs,cm,ch;
public void start() {
   if (ct == null) {
     ct = new Thread(this);
     ct.start();}}

 public void run() {
   Thread myThread = Thread.currentThread();
   while (ct == myThread) { repaint(); }  }
public void paint(Graphics g)
{Font f = new Font("MV Boli",Font.ITALIC,30);
    g.setFont(f);
    int R = (int)(Math.random()*256);
    int G = (int)(Math.random()*256);
    int B= (int)(Math.random()*256);
    Color c = new Color(R, G, B);
    g.setColor(c);
g.drawString("ViswaDeep",460,380);

g.setColor(Color.pink);
g.fillOval(200, 100, 260, 260);
g.setColor(Color.orange);
g.drawOval(199, 99, 262, 262);
g.drawOval(198, 98, 264, 264);
g.drawOval(197, 97, 266, 266);
g.drawOval(196, 96, 268, 268);
Font font = new Font("Arial",Font.BOLD,30);
   g.setFont(font);
g.setColor(Color.darkGray);
g.drawString("12", 313, 130);
g.drawString("6", 325, 352);
g.drawString("9", 206, 245);
g.drawString("3", 430, 240);

if(ts%60==0&&ts!=0){tm++;}
cm=(float) (0.105*tm);
pxm = (int) (cx + rm * Math.sin(cm));
pym = (int) (cy - rm * Math.cos(cm));
   g.setColor(Color.red);
g.drawLine(cx, cy, pxm, pym);

if(tm%12==0&&tm!=0){if(ts%60==0&&ts!=0){th++;}}
ch=(float) (0.105*th);
pxh = (int) (cx + rh * Math.sin(ch));
pyh = (int) (cy - rh * Math.cos(ch));
   g.setColor(Color.BLUE);
g.drawLine(cx, cy, pxh, pyh);

cs=(float) (0.105*ts);
pxs = (int) (cx + rs * Math.sin(cs));
pys = (int) (cy - rs * Math.cos(cs));
g.setColor(Color.black);
g.drawLine(cx, cy, pxs, pys);
try {Thread.sleep(1000);} catch (InterruptedException e){ }

ts++;
}
}

Friday, 12 June 2015

Photo Application in java

                             Photo Application in java


1]. Import different photos which you want in photo application.
2]. Place photo name in function getImage(getCodeBase(), "acura.jpg"). where photo name                       is acura.jpg.
3]. Don't forget to add extensions like jpg  to your photo name.


                                                                               ............Happy Coding







*********************************************************************************************************************

import java.applet.Applet;

import java.awt.Button;

import java.awt.Color;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Set;




public class VisuPhotoApp extends Applet implements ActionListener
{
Image i1;
int i=0,k;
  MediaTracker tr;
  Button b1 ,b2,b3;
  
  public void init()
  {   setLayout(null);
  
      b1 = new Button(" SLIDE SHOW ");
  b1.setBounds(650,10,90,30);
      b1.addActionListener(this);
      b1.setBackground(Color.RED);
          b1.setForeground(Color.WHITE);
      add(b1);
      b2 = new Button(" < PRE ");
  b2.setBounds(10,300,70,30);
  b2.addActionListener(this);
      b2.setBackground(Color.green);
  add(b2);
  b3 = new Button(" NEXT >");
  b3.setBounds(1275,300,70,30);
  b3.addActionListener(this);
      b3.setBackground(Color.green);
  add(b3);
 
  }
 
  public void paint(Graphics g) 
  {
     tr = new MediaTracker(this);
     switch (k) 
     {
          case 0: 
         b2.setVisible(false);
     i1 = getImage(getCodeBase(), "acura.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     delay(999999999);
     break;
     
          case 1:
          {
         b2.setVisible(true);b3.setVisible(true);
     i1 = getImage(getCodeBase(), "Audi-RS7.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     //delay(999999999);
     break;
          }
          case 2:
          {
         b2.setVisible(true);b3.setVisible(true);
     i1 = getImage(getCodeBase(), "Audi.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     //delay(999999999);
     break;
          }
          case 3:
          {
         b2.setVisible(true);b3.setVisible(true);
          
     i1 = getImage(getCodeBase(), "honda1.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550,this);
     //delay(999999999);
     break;
          }
          case 4:
          {
         b2.setVisible(true);b3.setVisible(true);
          
     i1 = getImage(getCodeBase(), "Lamborghini-Huracan.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     //delay(999999999);
     break;
          }
          case 5:
          {
         b2.setVisible(true);b3.setVisible(true);
     i1 = getImage(getCodeBase(), "Lamborghini.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     //delay(999999999);
     
          break;
          
          }
          case 6:
          {
         b2.setVisible(true);b3.setVisible(true);
          
     i1= getImage(getCodeBase(), "maybach.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     //delay(999999999);
     break;
          }
          case 7:
          {
         b3.setVisible(false);b2.setVisible(true);
          
     i1= getImage(getCodeBase(), "McLaren.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     break;
          }
          case 8:
          { 
     i1 = getImage(getCodeBase(), "acura.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     delay(999999999);
     i1 = getImage(getCodeBase(), "Audi-RS7.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     delay(999999999);
     i1 = getImage(getCodeBase(), "Audi.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     delay(999999999);
     i1 = getImage(getCodeBase(), "honda1.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550,this);
     delay(999999999);
     i1 = getImage(getCodeBase(), "Lamborghini-Huracan.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     delay(999999999);
     i1 = getImage(getCodeBase(), "Lamborghini.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     delay(999999999);
     i1 = getImage(getCodeBase(), "maybach.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     delay(999999999);
     i1 = getImage(getCodeBase(), "McLaren.jpg");
     tr.addImage(i1,0);
     g.drawImage(i1, 90,50,1180,550, this);
     b3.setVisible(false);
     i=7;
   break;
          }
          }
          
  }
  public void delay(int y)
{
int p;for(p=0;p<y+55;p++)
{}
}
public void actionPerformed(ActionEvent v) {
//Button2.setVisible(false);b1.setVisible(false);
if (v.getSource() == b1) 
{i=8;repaint();}
if (v.getSource() == b2) 
{i--;repaint();}
if (v.getSource() == b3) 
{i++;repaint();}
}

Monday, 25 May 2015

MAGIC HOME a home automation in java

/*
1] Animation of home in java with Automation.

2] Import car images of your wish and place name of ur selected car in getimage() ;                                     eg:- i1=getImage(getDocumentBase(),"acura.jpg");Where acura.jpg is car name.


3]  Don't forget  to specify format name as jpg or jpeg.


                                                      ............happy coding


*/
import java.io.*;
import java.awt.event.*;
import java.util.Scanner;
import java.util.Timer;
import java.awt.*;
import java.applet.*;
import java.awt.color.*;
import java.awt.image.ImageObserver;

import java.awt.Graphics;
@SuppressWarnings("serial")
public class mgichouse extends Applet implements ActionListener, ItemListener
{
int j=160;int p=135,r=105,p1;int k=0,z=-100;
int xPoints[]={240+p,200+p,240+p,280+p,250+p};
int yPoints[]={280-r,355-r,335-r,355-r,300-r}, nPoints=4;
Button b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14;
Choice cs;
Image i1;
Font f;
String s;

public void init()
{
setLayout(null);
cs=new Choice();
cs.setBounds(1200,145,155,40);
cs.add("VISU");
cs.add("ACURA");
cs.add("MAYBACH");
cs.add("MCLAREN");
cs.add("HONDA");
cs.add("LAMBORGHINI");
add(cs);
cs.addItemListener(this);
b13=new Button(" User Guide  ");
b13.setBounds(1200,10,150,35);
b13.setBackground(Color.CYAN);
b13.setForeground(Color.BLACK);
b13.addActionListener(this);
add(b13);
 b1=new Button("LIGHT ");
 b1.setBounds(1200,100-z,80,30);
 b1.setBackground(Color.ORANGE);
 b1.setForeground(Color.blue);
 b1.addActionListener(this);
 add(b1);
 b2=new Button("ON");
 b2.setBounds(1200,130-z,35,35);
 b2.setBackground(Color.GRAY);
 b2.setForeground(Color.WHITE);
 b2.addActionListener(this);
 add(b2);
 b3=new Button("OFF");
 b3.setBounds(1245,130-z,35,35);
 b3.setBackground(Color.GRAY);
 b3.setForeground(Color.WHITE);
 b3.addActionListener(this);
 add(b3);
 b4=new Button("GARAGE ");
 b4.setBounds(1200,190-z,150,30);
 b4.setBackground(Color.ORANGE);
 b4.setForeground(Color.blue);
 b4.addActionListener(this);
 add(b4);
 b5=new Button("LIFT UP ");
 b5.setBounds(1200,220-z,60,35);
 b5.setBackground(Color.GRAY);
 b5.setForeground(Color.WHITE);
 b5.addActionListener(this);
 add(b5);
 b6=new Button("DRAG DOWN ");
 b6.setBounds(1270,220-z,80,35);
 b6.setBackground(Color.GRAY);
 b6.setForeground(Color.white);
 b6.addActionListener(this);
 add(b6);
 b8=new Button("GARAGE LIGHT");
 b8.setBounds(1200,270-z,110,35);
 b8.setBackground(Color.ORANGE);
 b8.setForeground(Color.blue);
 b8.addActionListener(this);
 add(b8);
 b9=new Button("ON");
 b9.setBounds(1200,295-z,35,35);
 b9.setBackground(Color.GRAY);
 b9.setForeground(Color.WHITE);
 b9.addActionListener(this);
 add(b9);
 b10=new Button("OFF");
 b10.setBounds(1275,295-z,35,35);
 b10.setBackground(Color.GRAY);
 b10.setForeground(Color.WHITE);
 b10.addActionListener(this);
 add(b10);
 b11=new Button("CHOOSE CAR");
 b11.setBounds(1230,125,90,20);
 b11.setBackground(Color.RED);
 b11.setForeground(Color.WHITE);
 b11.addActionListener(this);
 add(b11);
 b7=new Button("  MY  WORDS ");
 b7.setBounds(1200,500-z,150,35);
 b7.setBackground(Color.GREEN);
 b7.setForeground(Color.blue);
 b7.addActionListener(this);
 add(b7);
  b12=new Button("  ABOUT  ");
 b12.setBounds(1200,400-z,150,35);
 b12.setBackground(Color.PINK);
 b12.setForeground(Color.BLACK);
 b12.addActionListener(this);
 add(b12);
 b14=new Button(" OK ");
 b14.setBounds(1250,70,50,30);
 b14.setBackground(Color.white);
 b14.setForeground(Color.black);
 b14.addActionListener(this);
 add(b14);


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
public void paint (Graphics g)
{
////////////////////////////////Over all wash starts////////////////
 Color k=new Color(250,250,160);
 g.setColor(k);
g.fillRect(80, 10, 955,650);
////////////////////////////////Over all wash ends///////////////////////

////////////////////////outline of entire home STARTS/////////////////////////
//front face 1 STARTS
g.setColor(Color.black);
g.drawLine(120,500+j, 194, 500+j);
g.drawLine(120,500+j, 120, 305+j);
g.drawLine( 420,300+j,420,500+j);
g.drawLine( 420,500+j,328,500+j);
g.drawLine( 328,500+j,328,410+j);
g.drawLine( 194,500+j,230,458+j);
g.drawLine( 230,458+j,328,458+j);
g.drawArc (230,325+j, 60, 275,90, 90);
g.drawLine(280,330+j , 280, 458+j); //
g.drawLine(279,329+j,279,458+j);    //double linening
g.drawLine(278,328+j,278,458+j);    //
g.drawLine(297, 342+j, 297, 390+j);
g.drawLine( 297, 390+j,323,390+j);
g.drawRect(297, 410+j, 31, 30);
for(int y=1;y<5;y++)
{
g.drawLine( 328+y,410+j,328+y,500+j);
g.drawArc(190,325+j, 142+y, 260, 20, 181);
g.drawLine( 328,500-y+j,420,500-y+j);
g.drawLine( 420-y,500+j,420-y,300+j);
g.drawLine( 194,500-y+j,120,500-y+j);
g.drawLine( 120+y,500+j,120+y,305+j);
g.drawLine( 194+y,500+j,230+y,458+j);
g.drawLine( 230,458+y+j,328,458+y+j);
}
//front face 1 end
////face 2 STARTS
g.drawLine(420, 500+j, 540, 395+j);
g.drawLine(500, 430+j, 500, 250+j);
g.drawLine(500, 250+j, 410,307+j);
g.drawLine(410, 307+j, 85, 307+j);
g.drawLine(410, 307+j, 410, 265+j);
g.drawLine( 415, 265+j,105,265+j);
g.drawLine( 105,265+j,85, 307+j);
g.drawLine(95,286+j,410,286+j);//
g.drawLine(96,285+j,410,285+j);//double linening
g.drawLine(94,287+j,410,287+j);//
g.drawLine(415,265+j,500,208+j);
g.drawLine(500,208+j,500,250+j);
g.drawLine(410,265+j,500,208+j);
g.drawLine(105,267+j,190,208+j);
g.drawLine(190,208+j,500,208+j);
g.drawLine(550, 395+j-2, 550, 195+j);
g.drawLine(950,395+j-4,950,195+j);
g.drawLine(550,195+j,950,195+j);
g.drawLine(540,195+j,550,195+j);
g.drawLine(950,395+j,1030,325+j);
g.drawLine(1030,325+j,1030,195+j);
g.drawLine(950,195+j,990,125+j);
g.drawLine(990,125+j,1030,195+j);
g.drawLine(540,195+j,540,175+j);
g.drawLine(540,175+j,950,175+j);
g.drawLine(950,175+j,990,105+j);
g.drawLine(990,105+j,1035,180+j);
g.drawLine(1035,180+j,1030,195+j);
g.drawLine(540,175+j,580,105+j);
g.drawLine(580,105+j,990,105+j);

for(int y=1;y<5;y++)
{
g.drawLine(420, 500-y+j, 540, 395-y+j);
g.drawLine(500-y, 430+j, 500-y, 250+j);
g.drawLine(500, 250-y+j, 410,307-y+j);
g.drawLine(410, 307-y+j, 85, 307-y+j);
g.drawLine(410-y, 307+j, 410-y, 265+j);
g.drawLine( 415, 265-y+j,105,265-y+j);
g.drawLine( 105,265-y+j,85, 307-y+j);
g.drawLine(415,265-y+j,500,208-y+j);
g.drawLine(500-y,208+j,500-y,250+j);
g.drawLine(105,267-y+j,190,208-y+j);
g.drawLine(190,208-y+j,500,208-y+j);
g.drawLine(540, 395-y+j, 950, 395-y+j);
g.drawLine(550+y, 395+j-2, 550+y, 195+j);
g.drawLine(950+y,395+j-4,950+y,195+j);
g.drawLine(550,195+j+y,950,195+j+y);
g.drawLine(540,195+j+y,550,195+j+y);
g.drawLine(950,395+j-y,1030,325+j-y);
g.drawLine(1030-y,325+j,1030-y,195+j);


}
for(int y=1;y<3;y++)
{
g.drawLine(950+y,195+j,990+y,125+j);
g.drawLine(990-y,125+j,1030-y,195+j);
//g.drawLine(1026-y,198+j,984-y,137+j);
g.drawLine(540+y,195+j,540+y,175+j);
g.drawLine(540,175+j+y,950,175+j+y);
g.drawLine(950-y,175+j,990-y,105+j);
g.drawLine(990+y,105+j,1035+y,180+j);
g.drawLine(1035,180+j+y,1030,195+j+y);
g.drawLine(1035,180+j-y,1030,195+j-y);
g.drawLine(540+y,175+j,580+y,105+j);
g.drawLine(580,105+j-y,990,105+j-y);
}
//face 2 end
///Face 3 starts
g.drawLine(540,175+j,540,j+2);
g.drawLine(190,208+j,190,j);
g.drawLine(365,j-130,540,j);
g.drawLine(365,j-129,540,j+1);
g.drawLine(190,j,377,j-123);
g.drawLine(190,j+1,377,j-122);
g.drawLine(540,j,560,j+18);
g.drawLine(540,j+1,560,j+19);
g.drawLine(560,j+18,810,j+18);
g.drawLine(560,j+19,810,j+19);
g.drawLine(800,j+18,800,105+j);
g.drawLine(182,j-10,175,j-20);
g.drawLine(182,j-9,175,j-19);
g.drawLine(182,j-10,190,j);
g.drawLine(182,j-9,191,j-1);
g.drawLine(175,j-20,365,j-150);
g.drawLine(175,j-19,365,j-149);
g.drawLine(365,j-150,567,j+3);
g.drawLine(365,j-149,567,j+4);
g.drawLine(567,j+3,815,j+3);
g.drawLine(567,j+4,815,j+4);
Color k3=new Color(255 ,228, 196);
g.setColor(k3);
//////////////////////////////////////////////////////////////////////////
for(int y=0;y<274;y++)
{g.drawLine(369+y,j-148,569+y,j);}       // IN COLORING OF FACE 3
g.setColor(Color.black);
/////////////////////////////////////////////////////////////////////////
g.drawLine(815,j+3,810,j+18);
g.drawLine(815,j+4,810,j+19);
g.drawLine(365,j-150,640,j-150);
g.drawLine(365,j-149,640,j-149);
g.drawLine(640,j-150,815,j+3);
g.drawLine(640,j-149,815,j+4);
g.drawLine(394,j-130,660,j-130);
g.drawLine(394,j-129,660,j-129);
for(int y=1;y<3;y++)
{
g.drawLine(540+y,175+j,540+y,j+2);
g.drawLine(190+y,208+j,190+y,j);
g.drawLine(800,j+18+y,800,105+j+y);
g.drawLine(800+y,105+j,800+y,j+18);

}
///Face 3 ends
////////////////////////////////////outline of entire home end///////////////////////
///////////////////////////////////garage starts
g.drawRect(620,250+j, 250, 143);
g.drawRect(619,249+j, 252, 143);
////////////////////////////////garage ends
////////////////////////////side windows starts
g.setColor(Color .black);
g.drawRect(600,30+j,150,55);
/////////////////////////////side windows ends
////////////////////removing extra portions of first part of color
g.setColor(Color.white);
g.fillRect(80, 5+j, 110, 198);
g.fillRect(540,397+j, 1050, 510);
g.fillRect(815,0, 1050,262);
g.fillRect(80,470,37,510);
g.fillRect(0,0,173,250);
for(int y=0;y<127;y++){g.drawLine(173,j-20-y, 440,-45-y); }
for(int y=0;y<167;y++){g.drawLine(644+y,j-150,819+y,j+4); }
for(int y=0;y<16;y++){g.drawLine(805+y,j+19,805+y,100+j); }
for(int y=0;y<40;y++){g.drawLine(994+y,102+j,1039+y,180+j); }
for(int y=0;y<80;y++){g.drawLine(954+y,396+j,1034+y,327+j); }
for(int y=0;y<115;y++){g.drawLine(424+y,500+j,544+y,395+j); }
for(int y=0;y<40;y++){g.drawLine(234-y,465+j+y,323,465+j+y); }
for(int y=0;y<100;y++){g.drawLine(97-y,267+j,183-y,203+j); }
for(int y=0;y<100;y++){g.drawLine(97-y,267+j,78-y,307+j); }
for(int y=0;y<35;y++){g.drawLine(185-y,10+j-y,128,10-y);
g.drawLine(189-y,10+j-y,180-y,j-9);}
g.fillOval(171, j-4, 10, 10);
g.fillRect(1030, 195+j, 5, 130);
//@@@@@@@@@@@@@@@@@@@@@@@@@@  COLORING STARTS  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
////////////////////////////////////////FOR FRONT WINDOW STARTS

g.setColor(Color.lightGray);
g.fillPolygon(xPoints, yPoints, nPoints);
g.setColor(Color.white);
g.fillRect(280,305, 180, 20);
g.setColor(Color.pink);
for(int y=0;y<10;y++)
{g.drawLine(280+y*20,325, 280+y*20, 310);}
g.setColor(Color.MAGENTA);
g.fillArc(280,290,181,30, 0,180);            
g.fillArc(280,315,181,30,180,180);
g.setColor(Color.white);
g.fillArc(250,150,60,40, 0,180);
g.setColor(Color.black);
g.fillArc(270,160,30,15, 0,180);
g.setColor(Color.white);
g.fillArc(470,150,60,40, 0,180);
g.setColor(Color.black);
g.fillArc(490,160,30,15, 0,180);

////////////////////////////////////////FOR FRONT WINDOW ENDS

////////////////////////////////////////FOR DOOR////////////////
Color k2=new Color(238, 130, 98);
Color k4=new Color(176, 196 ,222 );
Color k5=new Color(72, 61, 139 );
for(int y=0;y<17;y++)
{
Color k1=new Color(156, 93, 82);
g.setColor(k1);
g.drawLine(280+y,330+j+y,280+y, 458+j);
g.drawLine(280,330+j,285+y, 344+j);

}
for(int y=0;y<19;y++)
{
g.drawLine( 297, 391+j+y,323,391+j+y);
g.drawLine(297,440+y+j,327,440+j+y);
if(y<4)
{g.drawLine( 323+y,373+2*y+j+19,323+y,391+j+19);
g.drawLine( 327,373+11+j+19,327,391+j+19);
}
}
//Color k2=new Color(150,190,10);g.setColor(k2);
g.setColor(k2);
for(int y=0;y<25;y++)
{
g.drawLine(297+y, 342+j+2*y, 297+y, 390+j);
}
g.drawLine(298, 344+j, 296+26, 390+j);
g.drawLine(299, 344+j, 297+26, 388+j);
g.fillRect(297, 410+j, 31, 30);

////////////////////////////////////////FOR DOOR ends////////////////

//////////////////////////////////FOR GARAGE STARTS
g.setColor(k4);
g.fillRect(620,250+j, 250, 143);
g.setColor(k5);

g.drawLine(620,270+j,870,270+j);
g.drawLine(620,290+j,870,290+j);
g.drawLine(620,310+j,870,310+j);
g.drawLine(620,330+j,870,330+j);
g.drawLine(620,350+j,870,350+j);
g.drawLine(620,370+j,870,370+j);

g.drawLine(620,389+j,870,389+j);
g.drawLine(620,388+j,870,388+j);
g.drawLine(620,390+j,870,390+j);
g.drawLine(620,391+j,870,391+j);
g.drawLine(620,392+j,870,392+j);
g.drawLine(620,393+j,870,393+j);
/////////////////////////////////FOR GARAGE ENDS

///////////////////////////////for roof
//Color k3=new Color(255 ,228, 196);  DECLARED IN FACE 3
g.setColor(k3);
g.fillRect(192,208+j,220,53);
int xPoints1[]={412,412,495};int yPoints1[]={208+j,261+j,208+j}, nPoints1=3;
g.fillPolygon(xPoints1, yPoints1, nPoints1);
int xPoints2[]={192,192,118};int yPoints2[]={208+j,261+j,261+j}, nPoints2=3;
g.fillPolygon(xPoints2, yPoints2, nPoints2);
for(int y=0;y<405;y++)
{g.drawLine(583+y,106+j,543+y,174+j);}
//IN COLORING OF FACE 3
g.setColor(Color.red);
for(int y=0;y<15;y++)
{g.drawLine(87+y,302+j-y,405,302+j-y);
if(y<10){g.drawLine(87+y,302+j,95+y,288+j);}
}
for(int y=0;y<20;y++)
{
g.drawLine(97+y,284+j-y,405,284+j-y);
g.drawLine(96+y,284+j,106+y,265+j);
}
for(int y=0;y<37;y++)
{
g.drawLine(416,300-y+j,497,247-y+j);
if(y<6){g.drawLine(410+y,266+j,410+y,301+j);}
if(y<6){g.drawLine(416+y,266+j,416+y,301+j-y);}
if(y<19){g.drawLine(950,176+j+y,990,106+j+y);}
}
for(int y=0;y<409;y++)
{
g.drawLine(543+y,178+j,543+y,195+j);
if(y<22){g.drawLine(989,106+j+y,1030,171+j+y);}
if(y<4){g.drawLine(1030+y,174+j+y,1030+y,165+j+23-y);}
if(y<30){g.drawLine(190,j-29+y,365,j-148+y);}//g.drawLine(170-y,j-18+y,363+y,j-148-y);}
}
g.drawLine(365,j-148+31,190,j);
g.drawLine(365,j-149+31,190,j);
g.drawLine(365,j-147+31,190,j);
int x[]={190,190,176};int y2[]={j-29,j+1,j-20};int n=3;
g.fillPolygon(x,y2,n);
int x1[]={365,365,376};int y1[]={j-128,j-113,j-123};int n1=3;
g.setColor(Color.red);
g.fillPolygon(x1,y1,n1);
for(int y=0;y<17;y++)
{
g.drawLine(365,j-148+y,562,j+1+y);

if(y<13){ g.drawLine(560,j+5+y,808,j+5+y);}
}
g.setColor(Color.black);
g.drawLine(182,j-10,365,j-130);
g.drawLine(182,j-9,365,j-129);
g.setColor(Color.red);
g.drawLine(563,j+2,563,j+8);
g.drawLine(564,j+3,564,j+8);
g.drawLine(565,j+4,563,j+8);
g.drawLine(566,j+4,563,j+8);
g.drawLine(567,j+5,563,j+8);
g.drawLine(568,j+5,563,j+8);
g.drawLine(568,j+5,563,j+8);
int x3[]={808,808,815};int y3[]={j+5,j+18,j+5},n3=3;
g.fillPolygon(x3,y3,n3);
Color k6=new Color(188 ,143, 143);
g.setColor(k6);
for(int y=1;y<35;y++){
g.drawLine(600+y,31+j,600+y,84+j);
g.drawLine(715+y,31+j,715+y,84+j);}
Color k7=new Color( 154 ,255 ,154);
g.setColor(k7);
g.fillRect(635, 31+j, 80, 55);
g.setColor(Color.black);
g.drawLine(635,30+j,635,85+j);
g.drawLine(715,30+j,715,85+j);
g.drawLine(675,30+j,675,80+j);
g.drawLine(635,80+j,715,80+j);                    //coloring windows inside
g.drawLine(635,52+j,715,52+j);


if(p1==0||p1==2)
{
g.setColor(k7);
g.fillRect(635, 31+j, 80, 55);
g.setColor(Color.black);
g.drawLine(635,30+j,635,85+j);
g.drawLine(715,30+j,715,85+j);
g.drawLine(675,30+j,675,80+j);
g.drawLine(635,80+j,715,80+j);                    //coloring windows inside
g.drawLine(635,52+j,715,52+j);
}

if(p1==1)
{
for(int y=1;y<10;y++)
{
if(y%2==0){g.setColor(k7); }
if(y%2!=0){g.setColor(Color.green);}
g.fillRect(635, 31+j, 80, 55);
g.setColor(Color.black);
g.drawLine(635,30+j,635,85+j);
g.drawLine(715,30+j,715,85+j);
g.drawLine(675,30+j,675,80+j);
g.drawLine(635,80+j,715,80+j);                    //coloring windows inside
g.drawLine(635,52+j,715,52+j);
if(y%2==0){delay(600000000);}
if(y%2!=0){delay(100000000);}
}
}
if(p1==5)
{
g.setColor(k4);
g.fillRect(620,250+j, 250, 143);
g.setColor(k5);
g.drawLine(620,270+j,868,270+j);
g.drawLine(620,290+j,868,290+j);
g.drawLine(620,310+j,868,310+j);
g.drawLine(620,330+j,868,330+j);
g.drawLine(620,350+j,868,350+j);
g.drawLine(620,370+j,868,370+j);
for(int i=0;i<139;i++)
{
g.setColor(k4);
g.drawLine(620,393+j-i-6,868,393+j-i-6);
g.setColor(k5);
g.drawLine(620,389+j-i,871,389+j-i);
g.drawLine(620,388+j-i,871,388+j-i);
g.drawLine(620,390+j-i,871,390+j-i);
g.drawLine(620,391+j-i,871,391+j-i);
g.drawLine(620,392+j-i,871,392+j-i);
g.drawLine(620,393+j-i,871,393+j-i);
g.setColor(Color.black);
g.drawLine(620,393+j-i,870,393+j-i);
delay(30000000);
}
}

if(p1==6)
{   g.setColor(Color.black);
    g.fillRect(620,310+100,250,144);
for(int i=0;i<138;i++)
{
g.setColor(k5);
g.drawLine(620,389-138+j+i,870,389-138+j+i);
g.drawLine(620,388-138+j+i,870,388-138+j+i);
g.drawLine(620,390-138+j+i,870,390-138+j+i);
g.drawLine(620,391-138+j+i,870,391-138+j+i);
g.drawLine(620,392-138+j+i,870,392-138+j+i);
g.drawLine(620,393-138+j+i,870,393-138+j+i);
 delay(30000000);
if(i>1){g.setColor(k4); g.drawLine(620,386-138+j+i,870,386-138+j+i);}
if(i>20){g.setColor(k5);g.drawLine(620,270+j,868,270+j);}
if(i>40){g.setColor(k5);g.drawLine(620,290+j,868,290+j);}
if(i>60){g.setColor(k5);g.drawLine(620,310+j,868,310+j);}
if(i>80){g.setColor(k5);g.drawLine(620,330+j,868,330+j);}
if(i>100){g.setColor(k5);g.drawLine(620,350+j,868,350+j);}
if(i>120){g.setColor(k5);g.drawLine(620,370+j,868,370+j);}
}
}
if(p1==7)
{
cs.setVisible(false);b1.setVisible(false);b2.setVisible(false);b3.setVisible(false);b4.setVisible(false);
b5.setVisible(false);b6.setVisible(false);b7.setVisible(false);b8.setVisible(false);
b9.setVisible(false);b10.setVisible(false);b11.setVisible(false);b12.setVisible(false);
b13.setVisible(false);b14.setVisible(false);
for(int t=0;t<1050;t++)
{ g.setColor(Color.blue);
  g.drawLine(0, t, t, 0);
  g.setColor(Color.red);
  g.drawLine(0, 2100-t, 2100-t, 0);
  delay(949100);
}                                    //opening and closing
for(int t=0;t<1050;t++)
{
if(t>300)
{

Font font = new Font("Serif", Font.PLAIN, 34);
  g.setFont(font);
  g.setColor(Color.blue);
  g.drawString("THANK  YOU ", 550, 180);
  g.setColor(Color.CYAN);
  g.drawString("FOR ", 610, 230);
  g.setColor(Color.GREEN);
  g.drawString("WATCHING ", 550, 280);
  g.setColor(Color.BLACK);
  g.drawString(".....viswadeep ", 850, 450);
}
g.setColor(Color.white);
g.drawLine(0, 1050-t,1050-t, 0);
g.setColor(Color.white);
g.drawLine(0, 1050+t, 1050+t, 0);
delay(809100);
}

}

if(p1==9) {
for(int j1=0;j1<6;j1++)
{
g.setColor(Color.black);
g.fillRect(620,415, 250, 138);
g.setColor(k4);
for(int i=0;i<5;i++)
{g.drawLine(620,410+i,870,410+i);}
    delay(500000000);
if(cs.getSelectedItem()=="visu")
{i1=getImage(getDocumentBase(),"vis.jpg");}
else if(cs.getSelectedItem()=="ACURA")
{i1=getImage(getDocumentBase(),"acura.jpg");}
else if(cs.getSelectedItem()=="HONDA")
{i1=getImage(getDocumentBase(),"honda1.jpg");}
else if(cs.getSelectedItem()=="LAMBORGHINI")
{i1=getImage(getDocumentBase(),"Lamborghini-Huracan.jpg");}
else if(cs.getSelectedItem()=="MAYBACH")
{i1=getImage(getDocumentBase(),"maybach.jpg");}
else if(cs.getSelectedItem()=="MCLAREN")
{i1=getImage(getDocumentBase(),"McLaren.jpg");}
else
{i1=getImage(getDocumentBase(),"visu.jpeg");}
g.drawImage(i1, 620,415,250,138, null, null);
delay(100000000);
    }
}
if(p1==10) {
g.setColor(Color.black);
g.fillRect(620,250+j, 250, 143);
g.setColor(k4);
    g.drawLine(620,250+j,870,250+j);
    g.drawLine(620,251+j,870,251+j);
    g.drawLine(620,252+j,870,252+j);
    g.drawLine(620,253+j,870,253+j);
    g.drawLine(620,254+j,870,254+j);

}
if(p1==12)
{Color k71=new Color( 132 ,112, 255);
for(int x11=0;x11<=1050;x11++)
{ g.setColor(k71);
g.drawLine(0+x11,0,0+x11,670);//right to left                       //drag bars
delay(309999);
}
g.setFont(new Font("Calibri",Font.PLAIN,25));
g.setColor(Color.yellow);
g.drawString("Designed By :", 450, 300);
g.setColor(Color.WHITE);
g.setFont(new Font("ALGERIAN",Font.ITALIC,25));
g.drawString("V",504,340);delay(700000000);g.drawString("L",328,340);delay(700000000);
g.drawString("I",528,340);delay(700000000);g.drawString("E",346,340);delay(700000000);
g.drawString("S",542,340);delay(600000000);g.drawString("B",366,340);delay(600000000);
g.drawString("W",561,340);delay(600000000);g.drawString("A",386,340);delay(600000000);
g.drawString("A",584,340);delay(500000000);g.drawString("K",406,340);delay(500000000);
g.drawString("D",604,340);delay(400000000);g.drawString("U",426,340);delay(400000000);
g.drawString("E",624,340);delay(400000000);g.drawString("L",446,340);delay(400000000);
g.drawString("E",644,340);delay(300000000);g.drawString("A",466,340);delay(300000000);
g.drawString("P",664,340);delay(400000000);

}
if(p1==13)
{
for(int x11=0;x11<=670;x11++)
{
g.drawLine(0,0+x11,1050,0+x11);///top to down
delay(399999);
}
g.setFont(new Font("TimesRoman",Font.PLAIN,20));
g.setColor(Color.WHITE);
g.drawString("=>",20,75);g.drawString("=>",20,125);g.drawString("=>",20,175);g.drawString("=>",20,225);g.drawString("=>",20,275);
g.drawString("=>",20,325);g.drawString("=>",20,375);g.setColor(Color.green);
g.drawString("Choose the CAR which you like from set of five or a default car is selected automatically",42,75); delay(999999999);
g.drawString("You can switch ON or OFF Light by default it is switched OFF",42,125); delay(999999999);
g.drawString("You can DRAG DOWN or LIFT UP the Garage by default it is dragged down",42,175); delay(999999999);
g.drawString("To see the car you selected seitch on Garage light",42,225); delay(999999999);
g.drawString("To know how & who developed MAGIC HOME press ABOUT",42,275); delay(999999999);
g.drawString("Press MY WORDS to know what developer want to say",42,325); delay(999999999);
g.drawString("If you understood user guide press OK",42,375);
    }
}

private void delay(int y1) {
//
for(int y=0 ;y<y1;y++)
{}
}



public void actionPerformed( ActionEvent ae)
{



if (ae.getSource() == b2)
{p1=1;
repaint();
}
if (ae.getSource() == b3)
{p1=2;
repaint();
}
if (ae.getSource() == b5)
{p1=5;k=1;
repaint();
}
if (ae.getSource() == b6)
{p1=6;k=2;
repaint();
}
if (ae.getSource() == b7)
{p1=7;
repaint();
}
if (ae.getSource() == b9)
{p1=9;
repaint();
}
if (ae.getSource() == b10)
{p1=10;
repaint();
}
if (ae.getSource() == b11)
{p1=11;
repaint();
}
if (ae.getSource() == b12)
{p1=12;
repaint();
}
if (ae.getSource() == b13)
{p1=13;
repaint();
}if (ae.getSource() == b14)
{p1=14;
repaint();
}
}
@Override
public void itemStateChanged(ItemEvent ie) {
repaint();
// TODO Auto-generated method stub

}
}

Thursday, 19 March 2015

Introduction to APPLET in java


                  SMILELY  &  CRIEY  programmed in java

--------------------------------------------------------------------------------------

//Back again , this time with  SMILELY  &  CRIEY  programmed in java. You can know how to interface  init() and paint().                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    //         ..........HAPPY CODING

 

        import java.io.*;
        import java.awt.event.*;
        import java.util.Scanner;
        import java.awt.*;
import java.applet.*;
        /*<applet code="smile" width=150 height=140></applet>*/
       

        public class smile extends Applet implements ActionListener {
        int r1,t=0,m;
        Button b1;
        Button b2,b3;
       
            public void init()
            {
                Color k=new Color(120,89,90);
                setBackground(k);

                 b1=new Button("PRESS TO GET CRIEY ");
               
                b1.setBounds(1970,2580,160,120);
                b1.setBackground(Color.red);
                b1.setForeground(Color.blue);
                b1.addActionListener(this);
                add(b1);
               
                 b2=new Button("PRESS TO GET SMIELY ");
                add(b2);
                //b1.setBounds(970,2580,160,920);
                b2.setBackground(Color.red);
                b2.setForeground(Color.blue);
                b2.addActionListener(this);
               
                 b3=new Button("MY WORDS ");
                   
                    b3.setBounds(1970,2580,160,120);
                    b3.setBackground(Color.red);
                    b3.setForeground(Color.blue);
                    b3.addActionListener(this);
                    add(b3);



            }
           
           
   
            public void paint(Graphics g)
            {  
                if(t==0)
                {
                   
                    g.setColor(Color.yellow);
                    g.fillOval(340,180,250,250);   
                    g.setColor(Color.black);
                    g.fillOval(390,260,35,35);
                    g.setColor(Color.black);
                    g.fillOval(500,260,35,35);   
                    g.setColor(Color.black);
                    for(int i=0;i<9;i++)
                    {g.drawArc(400,305,130+i,68+i,180,180);}
                   
                    g.setColor(Color.yellow);
                    g.fillOval(740,180,250,250);   
                    g.setColor(Color.black);
                    g.fillOval(790,260,35,35);
                    g.setColor(Color.black);
                    g.fillOval(900,260,35,35);   
                    g.setColor(Color.black);//1300,435
                    for(int i=0;i<9;i++)
                    {g.drawArc(800,325,130+i,68+i,0,180);}
                    for(int i=0;i<6;i++)
                    g.drawArc(800,325+i,130,68,15,165);
                }
           
                   
               if(t==2)
               {Color k=new Color(120,89,90);
                setBackground(k);

                g.setColor(Color.yellow);
                g.fillOval(540,180,250,250);   
                g.setColor(Color.black);
                g.fillOval(590,260,35,35);
                g.setColor(Color.black);
                g.fillOval(700,260,35,35);   
                g.setColor(Color.black);
                for(int i=0;i<9;i++)
                {g.drawArc(600,305,130+i,68+i,180,180);}
               
               }
               if(t==1)
                {Color k=new Color(120,89,90);
                setBackground(k);

       
                    g.setColor(Color.yellow);
                    g.fillOval(640,180,250,250);   
                    g.setColor(Color.black);
                    g.fillOval(690,260,35,35);
                    g.setColor(Color.black);
                    g.fillOval(800,260,35,35);   
                    g.setColor(Color.black);//1300,435
                    for(int i=0;i<9;i++)
                    {g.drawArc(700,330,130+i,68+i,0,180);}
                    for(int i=0;i<6;i++)
                    g.drawArc(700,330+i,130,68,15,165);
                }
                   

               if(t==3)
               {//Color k=new Color(2,3,4);
                setBackground(Color.WHITE);
                   Font font = new Font("Serif", Font.PLAIN, 34);
                  g.setFont(font);
                  g.setColor(Color.blue);
                  g.drawString("THANK  YOU ", 550, 180);
                  g.setColor(Color.CYAN);
                  g.drawString("FOR ", 610, 230);
                  g.setColor(Color.GREEN);
                  g.drawString("WATCHING ", 550, 280);
                  g.setColor(Color.BLACK);
                  g.drawString(".....viswadeep ", 850, 450);


                 
               }
            }
       

public void actionPerformed( ActionEvent ae) {
               
                String str=ae.getActionCommand();
               
                if (ae.getSource() == b1)
                {t=1;
                repaint();//calling paint() function
                }
               
                if (ae.getSource() == b2)
                {t=2;
                repaint();//calling paint() function
                }
               
                if (ae.getSource() == b3)
                {t=3;
                repaint();//calling paint() function
                }
   
        }


}