/*
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
}
}