Saturday, 21 October 2017

Web application using python with Google maps API

        => In this blog we are going to develop a web app using Html, CSS and Javascript for Front end and back end using Python. Let us have a high level view of the web app, it is divided into four modules :-

1] input.html (we get input from user )
2] master.py (We get user input from input.html and pass it compute.py)
3] compute.py (Perform desired operations on user input and pass back the result to master.py)
4] output.html(Get the result from master.py and display it for user)

Source Code:-

Working of Web app:- 

  •                  User enter the input through input.html and it is passed to master.py using flask then master.py sends the user input to compute.py, after performing calculations on user input, compute.py send the results back to master.py,
  •               Finally master.py sends the result to output.html to display the result using Flask. output.html displays the output and wait till the user press Reset button, once Reset button is clicked then it redirects to input.html and this cycle goes on. 
  •           The module master.py assign the task to each module and acts as a bridge of communication between all the modules, here we implement Flask(Micro web framework for python).
                                                            WORKING CYCLE

INPUT VIEW


OUTPUT VIEW






Description:-

         We are getting two costs as input and passing it to the Gurobi optimizer for solving facility location problem, it is done in compute.py, It gives us the locations and they are displayed in the output.html. It displays the new locations with green markers and lines are drawn between the new markers and the old markers(red). Using two costs entered by user, a pie chart is drawn just to give a demo of pie chart. Click on the markers to get information regarding it. Hit the Reset button to get back.

Useful points:- 

    • In this application as we are display places in google maps we need to use google maps API. To use it we require  Google maps API key get it from the Google-API-KEY
    • If you are using Pycharm IDE for developing python web app, create a new project, right click on project => create a sub folder with name 'templates', right click on templates => create 2 html files one for input and another for output. In the same project create 2 python files one for master and another for compute.
    • To solve facility location problem we are using Gurobi optimizer download it from gurobi-optimizer. Got the source code for Gurobi from   http://examples.gurobi.com/facility-location/#demo

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

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


Monday, 28 November 2016

Updated Snake Game

                                 UPDATED SNAKE GAME


Description

This game provides all of the challenge expected from an "impossible" game while also making it's code very simple.


what's New

Update 1.01
Bug fixes and tweaks.

FLAW'S AND RECTIFICATION
There are 2  major Flaws in before game:-
1] speed of snake does not increases as score increases.
2] Even though Snake's Head touches it's Tail, game is allowing us to play further instead of                   showing GAME OVER CARD.

In this Update I fixed those 2 Flaws:-
=>First one is fixed by decreasing the TIME DELAY as Score increases.
=>Second is resolved by logical analysis that is if first circle touches any other circle then it comes         out of loop.

                                                                               .............HAPPY CODING,
                                                                                                  VISWADEEP.

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




import java.applet.*;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.Random;

public class snake extends Applet implements KeyListener,Runnable{
  private Image i1;int sl=180;
    private  Graphics doubleG;
  int  dx=25;int dy=25;char k,k1;int v=0;int b=3;int tx,ty;   int y = 251; int x =251;int x1;int z=0;
    public boolean keyLeft, keyUp, keyRight, keyDown;@SuppressWarnings({ "unused", "serial" })
int xx[]=new int[20];int yy[]=new int[20];int dxx[]=new int[20];int dyy[]=new int[20];
Random t1 = new Random();   Random t2 = new Random();int t=1;

public void paint (Graphics g) {

  if(b>3)

 {for(int i=0;i<b;i++)       //THIS BLOCK IS TO MAKE PLAYER TO EXIT FROM GAME IF                                                        // HEAD COLLIDE WITH TAIL
 {
  if(xx[0]==xx[b-i]&&yy[0]==yy[b-i])
  {z=1;}
 }
 }

 if(z==0&&b<19)
     {
     //String s = String.valueOf(x);g.drawString(s, 990,34);
     //String s1 = String.valueOf(y);g.drawString(s1, 1100,34);
     //String b2 = String.valueOf(b);g.drawString(b2, 990,134);
         String score = String.valueOf(v*50);
         String time = String.valueOf(t*200);
         Font font = new Font("Arial",Font.BOLD,30);
      g.setFont(font);
   g.setColor(Color.darkGray);
        g.drawString(score, 990,234);    g.drawString(time, 990,294);
        Font f = new Font("MV Boli",Font.ITALIC,30);
        g.setFont(f);
        g.setColor(Color.blue);
        g.drawString("Score :", 875,230);
        g.drawString("Time(ms) :", 805,290);
     if(v==0)
     {g.setColor(Color.green);
   g.fillOval(dxx[0],dyy[0],30,30);
   
     }
     if(dxx[v]==x&&dyy[v]==y)
     {
      v++;b++;
                  sl=sl-10;//SPEED OF SNAKE INCREASES  WITH SCORE

           }g.setColor(Color.green);
            g.fillOval(dxx[v],dyy[v],30,30);

        g.setColor(Color.red);
     g.drawRect(47, 47, 756, 606);
     g.drawRect(48, 48, 754, 604);
        g.drawRect(49, 49, 752, 602);
     g.drawRect(50, 50, 750, 600);
        for(int m=0;m<b;m++){xx[b-m]=xx[b-m-1];yy[b-m]=yy[b-m-1];}
        xx[0]=x;yy[0]=y;
     for(int i=0;i<b;i++)
     {
      g.setColor(Color.green);
       g.fillOval(xx[i],yy[i],30,30);
            if(i==0){g.setColor(Color.black);g.fillOval(xx[i]+10,yy[i]+10,10,10);    }
        }
     }
   
     else if(z==1&&b<20)
     {
      Font font = new Font("Arial",Font.BOLD,70); g.setFont(font);
      g.drawString("GAME OVER", 480,250);
 }
     else if(b>=19)
     {
   Font font = new Font("Arial",Font.BOLD,70);
        g.setFont(font);
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("U WIN", 480,250);

   
     }
    }
public void update(Graphics g)
{if(i1==null)
{i1=createImage(this.getSize().width,this.getSize().height);
doubleG=i1.getGraphics();
 }
doubleG.setColor(getBackground());
doubleG.fillRect(0,0,this.getSize().width,this.getSize().height);
doubleG.setColor(getForeground());
paint(doubleG);
g.drawImage(i1,0,0,this);}
    public void init()
    {
     setSize(1200,1200);
     for(int i2=0;i2<18;i2++)
    {
      tx=t1.nextInt(20);  ty=t2.nextInt(20);
      dxx[i2]=126+(tx*25);dyy[i2]=126+(ty*25);
    }
    Thread t=new Thread(this);
     t.start();
        addKeyListener(this);
        setFocusable(true);
     }

    public void run() {
  while(b<20)
  {
   if(x>776){z=1; }if(x<51){z=1;}if(y>626){z=1; }if(y<51){z=1; }
if(y>=51&&k== 'u'){y=y-dy;}else if(x<=776&&k=='r'){x=x+dx;}else if(x>=51&&k== 'l'){x=x-dx;}else if(y<=626&&k=='d'){y=y+dy;}
repaint();try {Thread.sleep(sl);t++;} catch (InterruptedException e) {e.printStackTrace();}
  }

 }
 
          public void keyPressed(KeyEvent e) {

            int key = e.getKeyCode();
            if(key == KeyEvent.VK_UP&&k1!='d'){    k='u';}
            if(key == KeyEvent.VK_RIGHT&&k1!='l'){ k='r';}
            if(key == KeyEvent.VK_LEFT&&k1!='r'){  k='l';}
            if(key == KeyEvent.VK_DOWN&&k1!='u'){  k='d';}
           k1=k;
               
     
          }
       public void keyReleased(KeyEvent e) {}
       public void keyTyped(KeyEvent e) {}

}


Snake Game


                                    SNAKE GAME


Idea behind this Game:


1] To confine the snake draw a border in such a way that if it crosses the border then          player should loose.    

2] Create a small snake with some filled ovals of same radius  (r) side by side this can     be  achieved by placing circles with a spacing of 2r .

3] Movement of snake can be set by assigning the arrow keys to it.

4] Food can be created at random places by using Random class.

5] Each time the snake catches the food not only score but also length of the snake         has   to be increased.

6] Speed of the snake can be varied by using Thread.Sleep() function.

7] Concept of double buffering is used to stop blinking in snake movement.

   



                                                         

                                                                                                              ........HAPPY CODING

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

import java.applet.*;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.Random;

public class snake extends Applet implements KeyListener,Runnable{
     private Image i1;
       private  Graphics doubleG;
  int  dx=25;int dy=25;char k,k1;int v=0;int b=3;int tx,ty;
  int y = 251; int x =251;int x1;int z=0;
    public boolean keyLeft,keyUp,keyRight,keyDown;
@SuppressWarnings({ "unused", "serial" })
int xx[]=new int[20];int yy[]=new int[20];int dxx[]=new int[20];
int dyy[]=new int[20];
Random t1 = new Random();   Random t2 = new Random();int t=1;
 
public void paint (Graphics g) {
        if(z==0&&b<19)
        {
        //String s = String.valueOf(x);g.drawString(s, 990,34); //for knowing movement of snake in x axis
        //String s1 = String.valueOf(y);g.drawString(s1, 1100,34);
//for knowing movement of snake in y axis      
        //String b2 = String.valueOf(b);g.drawString(b2, 990,134);
//for knowing how much food snake had ate
         String score = String.valueOf(v*50);//printing score
         String time = String.valueOf(t*200);//printing time
         Font font = new Font("Arial",Font.BOLD,30);
         g.setFont(font);
         g.setColor(Color.darkGray);
        g.drawString(score, 990,234);g.drawString(time, 990,294);
        Font f = new Font("MV Boli",Font.ITALIC,30);
        g.setFont(f);
        g.setColor(Color.blue);
        g.drawString("Score :", 875,230);
        g.drawString("Time(ms) :", 805,290);
        if(v==0)
        {g.setColor(Color.green);
         g.fillOval(dxx[0],dyy[0],30,30);//initial position
           
        }
        if(dxx[v]==x&&dyy[v]==y)
        {
            v++;b++;//creating new food once it complete old

                    }g.setColor(Color.green);
                     g.fillOval(dxx[v],dyy[v],30,30);

        g.setColor(Color.red);
        g.drawRect(47, 47, 756, 606);
        g.drawRect(48, 48, 754, 604);
        g.drawRect(49, 49, 752, 602);//4 lines for borders
        g.drawRect(50, 50, 750, 600);

          for(int m=0;m<b;m++){xx[b-m]=xx[b-m-1];yy[b-m]=yy[b-m-1];}
        xx[0]=x;yy[0]=y;
        for(int i=0;i<b;i++)
        {
            g.setColor(Color.green);
             g.fillOval(xx[i],yy[i],30,30);
            if(i==0){g.setColor(Color.black);g.fillOval(xx[i]+10,yy[i]+10,10,10);    }
        }
        }

//below shown loop is executed once player lost the game                   else if(z==1&&b<20)
        {
            Font font = new Font("Arial",Font.BOLD,70); g.setFont(font);
            g.drawString("GAME OVER", 480,250);
    }
//below shown loop is executed once player completes the game
        else if(b>=19)  
        {
            Font font = new Font("Arial",Font.BOLD,70);
                 g.setFont(font);
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("U WIN", 480,250);

           
        }
    }
public void update(Graphics g)//doubling buffering
{if(i1==null)
{i1=createImage(this.getSize().width,this.getSize().height);
doubleG=i1.getGraphics();
    }
doubleG.setColor(getBackground());
doubleG.fillRect(0,0,this.getSize().width,this.getSize().height);
doubleG.setColor(getForeground());
paint(doubleG);
g.drawImage(i1,0,0,this);}
    public void init()
    {
        setSize(1200,1200);//Here random places are assigned
        for(int i2=0;i2<18;i2++)
    {
      tx=t1.nextInt(20);  ty=t2.nextInt(20);
      dxx[i2]=126+(tx*25);dyy[i2]=126+(ty*25);
    }
    Thread t=new Thread(this);
        t.start();
        addKeyListener(this);
        setFocusable(true);
     }
  //In run function both movement and confinement of snake is done
    public void run() {
        while(b<20)
        {
 if(x>776){z=1; }if(x<51){z=1;}if(y>626){z=1; }if(y<51){z=1; }
if(y>=51&&k== 'u'){y=y-dy;}else if(x<=776&&k=='r'){x=x+dx;}else if(x>=51&&k== 'l'){x=x-dx;}else if(y<=626&&k=='d'){y=y+dy;}
repaint();try {Thread.sleep(180);t++;}
catch (InterruptedException e) {e.printStackTrace();}
        }
    }
   //in below function arrow keys are lisened
          public void keyPressed(KeyEvent e) {

            int key = e.getKeyCode();
            if(key == KeyEvent.VK_UP&&k1!='d'){    k='u';}
            if(key == KeyEvent.VK_RIGHT&&k1!='l'){ k='r';}
            if(key == KeyEvent.VK_LEFT&&k1!='r'){  k='l';}
            if(key == KeyEvent.VK_DOWN&&k1!='u'){  k='d';}
           k1=k;
                 
     
          }
       public void keyReleased(KeyEvent e) {}
       public void keyTyped(KeyEvent e) {}
}


Thursday, 4 August 2016

Android app for FLAMES

                                                     FLAMES Android App


=> It follows the same way just like 1]how we take two names, 2]cross the common letters of both names, 3]counting  the number of uncommon letters and then 4]striking the FLAMES with the number.

              In this post I shared both MainActivity.java  and activity_main.xml files.


Idea behind reducing complexity of the game:-

             * complexity of the game can be reduced after finding the number of uncommon letters  i.e, last step striking the FLAMES with the number. I calculated it for 50 uncommon letters. 

             => Yes you are right once if sum of uncommon letters of both names exceeds 50 then this app is not going to work. But it is rare to find a person with name having more than 25 letters( so that sum of two leads to 50), More over there are only 26 different Alphabets only. Which means there is a very minute probability to get more than 50 uncommon letters.

Benefit by doing so :-

     => We can increase Running time(Runs fast), decreases complexity(uses less ram) and reduces memory(app occupies less space in your mobile) at same time. Mostly in any Algorithm we need to compromise at one or the another but by using above idea we can achieve it.

Specifications

Version                  :-   1.0

Memory occupied  :-    784 KB

Running Time        :-    < 1 sec

Location                :-     No need

    

NEXT VERSION :- 


 In next version I will try to extend it for persons with big names (more than 100 letters) with out getting compromised for above 3. Meet you in next version. 

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

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











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

                         MainActivity.java

package com.viswadeepgmail.l.flames;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
    int c, d, as1, as2, e, h, k;
    private EditText n1;
    private EditText n2;
    private TextView t1;
    private String s1;
    private String s2;


    @Override    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        n1 = (EditText) findViewById(R.id.editText);

        n2 = (EditText) findViewById(R.id.editText2);

        t1 = (TextView) findViewById(R.id.textView);


    }


    public void onButtonclick(View v) {
        int u = 0, m5 = 0, j5 = 0;
        String s1 = n1.getText().toString();
        s1 = s1.replace(" ", "");
        s1 = s1.toUpperCase();
        c = s1.length();

        String s2 = n2.getText().toString();

        s2 = s2.replace(" ", "");
        d = s2.length();
        s2 = s2.toUpperCase();

        if (c == 0 && d == 0) {
            Toast.makeText(getApplicationContext(), 
              "Both name feilds are Empty", Toast.LENGTH_LONG).show();
            t1.setText("Cannot find Relation ");

        }
        else if (c == 0) {
            Toast.makeText(MainActivity.this, 
              "Enter First Person Name", Toast.LENGTH_LONG).show();
            t1.setText("Cannot find Relation ");


        } else if (d == 0) {
            Toast.makeText(MainActivity.this, 
              "Enter Second Person Name", Toast.LENGTH_LONG).show();
            t1.setText("Cannot find Relation ");

        }
        else {
            if (c != 0 && d != 0) {
                if (c == d) {
                    for (int i5 = 0; i5 < c; i5++) {
                        if (s1.charAt(i5) == s2.charAt(i5)) {
                            m5++;
                        }
                    }
                }
                if (m5 == c) {
                    j5 = 5;
                }

                for (int r1 = 0; r1 < c; r1++) {
                    as1 = s1.charAt(r1);
            if ((as1 >= 97 && as1 <= 122) || (as1 >= 65 && as1 <= 90)) {
                        u = u;
                    } else {
                        u = u + 1;
                    }
                }
                for (int r2 = 0; r2 < d; r2++) {
                    as2 = s2.charAt(r2);
            if ((as2 >= 97 && as2 <= 122) || (as2 >= 65 && as2 <= 90)) {
                        u = u;
                    } else {
                        u = u + 1;
                    }
                }

                if (u == 0) {
                    e = c + d;

                    h = 0;
                    for (int i = 0; i < c; i++) {
                        for (int j = 0; j < d; j++) {
                            if (s1.charAt(i) == s2.charAt(j)) {
                                h++;
                                StringBuilder s4 = new StringBuilder(s1);
                                s4.setCharAt(i, '/');
                                s1 = new String(s4);
                                StringBuilder s3 = new StringBuilder(s2);
                                s3.setCharAt(j, '-');
                                s2 = new String(s3);
                            } else {
                                h = h;
                            }


                        }

                    }


                    k = e - (2 * h);

                    if (k == 2 || k == 4 || k == 7 || k == 9 || k == 20  
                        ||k == 22 || k == 25) {
                        t1.setText("ENEMIES ");
                    } else if (k == 3 || k == 5 || k == 14 || k == 16 
                        || k == 18 || k == 23) {
                        t1.setText("FRIENDS ");
                    } else if (k == 10 || k == 19) {
                        t1.setText("LOVE ");
                    } else if(k == 12 || k == 8 || k == 13 || k == 17 
                         || k == 28 || k == 30) {
                        t1.setText("AFFECTION ");
                    } else if (k == 6 || k == 11 || k == 15 || k == 26) {
                        t1.setText("MARRIAGE ");
                    } else if (k == 0 && j5 == 5) {
                        t1.setText("NAMES ARE EQUAL ");
                    } else if (k == 0) {
                        t1.setText("  THEY HAVE SAME LETTERS      ");
                    } else {
                        t1.setText("SIBLINGS ");
                    }

                   
                } else {
                    t1.setText("RELATION CANNOT BE DETERMINED");
                }

            }

        }
    }
    public void onSecondButtonclick(View v) {
        t1.setText("Relation ");
        n1.setText("");
        n2.setText("");



    }
}


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

                           activity_main.xml


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/background"
tools:context="com.viswadeepgmail.l.flames.MainActivity"
android:weightSum="1">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Relation"
android:id="@+id/textView"
android:layout_gravity="center_horizontal"
android:textStyle="bold|italic"
android:elevation="@dimen/elevation"
android:textColor="#f66015"
android:textSize="25dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/textView2"
android:layout_gravity="center_horizontal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/textView3"
android:layout_gravity="center_horizontal" />
<EditText
android:layout_width="249dp"
android:layout_height="wrap_content"
android:id="@+id/editText"
android:hint="Enter name 1"
android:imeOptions="actionNext"
android:inputType="textPersonName"
android:textStyle="italic" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/textView4"
android:layout_gravity="center_horizontal" />
<EditText
android:layout_width="247dp"
android:layout_height="wrap_content"
android:id="@+id/editText2"
android:hint="Enter name 2"
android:imeOptions="actionDone"
android:inputType="textPersonName"
android:textStyle="italic" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/textView5"
android:layout_gravity="center_horizontal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/textView6"
android:layout_gravity="center_horizontal" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="374dp"
android:layout_height="fill_parent">
<Button
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="@string/button_find"
android:id="@+id/getFlames"
android:onClick="onButtonclick" />
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/textView7" />
<Button
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="Renew"
android:id="@+id/button"
android:onClick="onSecondButtonclick" />
</LinearLayout>
</LinearLayout>
</LinearLayout>






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

}
}