import java.applet.*; import java.awt.*; import java.io.*; import java.net.*; public class menu extends java.applet.Applet implements Runnable{ URL imgURL; Thread runThread2; Image offscreenImg; Graphics offscreenG; int[] x={ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}; int[] y={ 2, 24, 42, 60, 78, 96, 114, 132, 150, 168, 186, 204, 222, 240}; int[] xs={ -2, -2, -2, -2, -2, -2, -2}; int[] ys=new int[7]; int[] xe={ -2, -2, -2, -2, -2}; int[] ye=new int[5]; int[] xp={ -2, -2, -2, -2, -2}; int[] yp=new int[5]; int[] xam={ -2, -2, -2}; int[] yam=new int[3]; int[] xas={ -2, -2}; int[] yas=new int[2]; int[] xjs={ -2, -2, -2, -2}; int[] yjs=new int[4]; int[] xl={ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82}; int[] yl={ 18, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240}; Image[] main=new Image[14]; Image[] sports=new Image[7]; Image[] ent=new Image[5]; Image[] people=new Image[5]; Image[] amiga=new Image[3]; Image[] ast=new Image[2]; Image[] js=new Image[4]; Image[] links=new Image[12]; int ax=3, ay=3, ayy=2; int click=0, status=1, click2=0; String file_path; public void init() { file_path="/~cwarner/new/mainmenu"; try { for (int j=0; j<14; j++) { imgURL=new URL("http","grove.ufl.edu",80,file_path+j+".gif"); main[j]=getImage(imgURL); } file_path="/~cwarner/new/sportsmenu"; for (int j=0; j<7; j++) { imgURL=new URL("http","grove.ufl.edu",80,file_path+j+".gif"); sports[j]=getImage(imgURL); } file_path="/~cwarner/new/entmenu"; for (int j=0; j<5; j++) { imgURL=new URL("http","grove.ufl.edu",80,file_path+j+".gif"); ent[j]=getImage(imgURL); } file_path="/~cwarner/new/peoplemenu"; for (int j=0; j<5; j++) { imgURL=new URL("http","grove.ufl.edu",80,file_path+j+".gif"); people[j]=getImage(imgURL); } file_path="/~cwarner/new/Amigamenu"; for (int j=0; j<3; j++) { imgURL=new URL("http","grove.ufl.edu",80,file_path+j+".gif"); amiga[j]=getImage(imgURL); } file_path="/~cwarner/new/astmenu"; for (int j=0; j<2; j++) { imgURL=new URL("http","grove.ufl.edu",80,file_path+j+".gif"); ast[j]=getImage(imgURL); } file_path="/~cwarner/new/jsmenu"; for (int j=0; j<4; j++) { imgURL=new URL("http","grove.ufl.edu",80,file_path+j+".gif"); js[j]=getImage(imgURL); } file_path="/~cwarner/new/linksmenu"; for (int j=0; j<12; j++) { imgURL=new URL("http","grove.ufl.edu",80,file_path+j+".gif"); links[j]=getImage(imgURL); } } catch (Exception e) { int pts=0;} offscreenImg=createImage(162,385); offscreenG=offscreenImg.getGraphics(); } public void start() { if (runThread2==null) { runThread2=new Thread(this); runThread2.start(); } } public void stop() { if (runThread2!=null) { runThread2.stop(); runThread2=null; } } public void run() { while (true) { try {Thread.sleep(100);} catch (InterruptedException e) {} try { if (status==0) { if (click2==1 | (click2>12 & click2<20)) { for (int j=6; j>-1; j=j-1) { for (int l=2; l<14; l++) { y[l]=y[l]-18;} xs[j]=-2; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click2==2 | (click2>19 & click2<25)) { for (int j=4; j>-1; j=j-1) { for (int l=3; l<14; l++) { y[l]=y[l]-18;} xe[j]=-2; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click2==3 | (click2>24 & click2<30)) { for (int j=4; j>-1; j=j-1) { for (int l=4; l<14; l++) { y[l]=y[l]-18;} xp[j]=-2; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click2==4 | (click2>29 & click2<33)) { for (int j=2; j>-1; j=j-1) { for (int l=5; l<14; l++) { y[l]=y[l]-18;} xam[j]=-2; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click2==11 | (click2>32 & click2<35)) { for (int j=1; j>-1; j=j-1) { for (int l=12; l<14; l++) { y[l]=y[l]-18;} xas[j]=-2; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click2==12 | (click2>34 & click2<39)) { for (int j=3; j>-1; j=j-1) { y[13]=y[13]-18; xjs[j]=-2; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } } if (status==0 | status==2) { if (click>12 | y[12]==222) { if (click==0) { URL link=new URL("http://grove.ufl.edu/~cwarner/index2.html"); getAppletContext().showDocument(link,"main"); } if (click==1) { for (int j=0; j<7; j++) { for (int l=2; l<14; l++) { y[l]=y[l]+18;} xs[j]=2; ys[j]=42+j*18; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click==2) { for (int j=0; j<5; j++) { for (int l=3; l<14; l++) { y[l]=y[l]+18;} xe[j]=2; ye[j]=60+j*18; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click==3) { for (int j=0; j<5; j++) { for (int l=4; l<14; l++) { y[l]=y[l]+18;} xp[j]=2; yp[j]=78+j*18; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click==4) { for (int j=0; j<3; j++) { for (int l=5; l<14; l++) { y[l]=y[l]+18;} xam[j]=2; yam[j]=96+j*18; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click==5) { URL link=new URL("http://grove.ufl.edu/~cwarner/other.html"); getAppletContext().showDocument(link,"main"); } if (click==6) { URL link=new URL("http://grove.ufl.edu/~cwarner/personal.html"); getAppletContext().showDocument(link,"main"); } if (click==7) { URL link=new URL("mailto:cwarner@grove.ufl.edu"); getAppletContext().showDocument(link); } if (click==8) { URL link=new URL("http://www.clemson.edu/"); getAppletContext().showDocument(link,"main"); } if (click==9) { URL link=new URL("http://www.ufl.edu/"); getAppletContext().showDocument(link,"main"); } if (click==10) { URL link=new URL("http://grove.ufl.edu/~cwarner/poll.html"); getAppletContext().showDocument(link,"main"); } if (click==11) { for (int j=0; j<2; j++) { for (int l=12; l<14; l++) { y[l]=y[l]+18;} xas[j]=2; yas[j]=222+j*18; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click==12) { for (int j=0; j<4; j++) { y[13]=y[13]+18; xjs[j]=2; yjs[j]=240+j*18; repaint(); try {Thread.sleep(350);} catch (InterruptedException e) {} } } if (click==13) { URL link=new URL("http://grove.ufl.edu/~cwarner/sports.html"); getAppletContext().showDocument(link,"main"); } if (click==14) { URL link=new URL("http://grove.ufl.edu/~cwarner/NCAA.html"); getAppletContext().showDocument(link,"main"); } if (click==15) { URL link=new URL("http://grove.ufl.edu/~cwarner/CFA.html"); getAppletContext().showDocument(link,"main"); } if (click==16) { URL link=new URL("http://grove.ufl.edu/~cwarner/MLB.html"); getAppletContext().showDocument(link,"main"); } if (click==17) { URL link=new URL("http://grove.ufl.edu/~cwarner/NBA.html"); getAppletContext().showDocument(link,"main"); } if (click==18) { URL link=new URL("http://grove.ufl.edu/~cwarner/NFL.html"); getAppletContext().showDocument(link,"main"); } if (click==19) { URL link=new URL("http://grove.ufl.edu/~cwarner/othsp.html"); getAppletContext().showDocument(link,"main"); } if (click==20) { URL link=new URL("http://grove.ufl.edu/~cwarner/ent.html"); getAppletContext().showDocument(link,"main"); } if (click==21) { URL link=new URL("http://grove.ufl.edu/~cwarner/ent/magazines.html"); getAppletContext().showDocument(link,"main"); } if (click==22) { URL link=new URL("http://grove.ufl.edu/~cwarner/ent/movies.html"); getAppletContext().showDocument(link,"main"); } if (click==23) { URL link=new URL("http://grove.ufl.edu/~cwarner/ent/TVshows.html"); getAppletContext().showDocument(link,"main"); } if (click==24) { URL link=new URL("http://grove.ufl.edu/~cwarner/ent/other.html"); getAppletContext().showDocument(link,"main"); } if (click==25) { URL link=new URL("http://grove.ufl.edu/~cwarner/people.html"); getAppletContext().showDocument(link,"main"); } if (click==26) { URL link=new URL("http://grove.ufl.edu/~cwarner/people/athletes.html"); getAppletContext().showDocument(link,"main"); } if (click==27) { URL link=new URL("http://grove.ufl.edu/~cwarner/people/actmod.html"); getAppletContext().showDocument(link,"main"); } if (click==28) { URL link=new URL("http://grove.ufl.edu/~cwarner/people/actors.html"); getAppletContext().showDocument(link,"main"); } if (click==29) { URL link=new URL("http://grove.ufl.edu/~cwarner/people/other.html"); getAppletContext().showDocument(link,"main"); } if (click==30) { URL link=new URL("http://grove.ufl.edu/~cwarner/AMIGA.html"); getAppletContext().showDocument(link,"main"); } if (click==31) { URL link=new URL("http://grove.ufl.edu/~cwarner/AMIGAgames.html"); getAppletContext().showDocument(link,"main"); } if (click==32) { URL link=new URL("http://grove.ufl.edu/~cwarner/AMIGAoth.html"); getAppletContext().showDocument(link,"main"); } if (click==33) { URL link=new URL("http://grove.ufl.edu/~cwarner/Astronomy.html"); getAppletContext().showDocument(link,"main"); } if (click==34) { URL link=new URL("http://www.geocities.com/Area51/Cavern/3461/SolarSystem.html"); getAppletContext().showDocument(link,"main"); } if (click==35) { URL link=new URL("http://grove.ufl.edu/~cwarner/js/"); getAppletContext().showDocument(link,"main"); } if (click==36) { URL link=new URL("http://grove.ufl.edu/~cwarner/js/GMN.html"); getAppletContext().showDocument(link,"main"); } if (click==37) { URL link=new URL("http://grove.ufl.edu/~cwarner/js/Blackjak.html"); getAppletContext().showDocument(link,"main"); } if (click==38) { URL link=new URL("http://grove.ufl.edu/~cwarner/js/Blackjak_2.html"); getAppletContext().showDocument(link,"main"); } if (click==39) { URL link=new URL("http://espn.go.com/"); getAppletContext().showDocument(link,"main"); } if (click==40) { URL link=new URL("http://espn.go.com/ncb/today/sco.html"); getAppletContext().showDocument(link,"main"); } if (click==41) { URL link=new URL("http://espn.go.com/ncf/week/sco.html"); getAppletContext().showDocument(link,"main"); } if (click==42) { URL link=new URL("http://espn.go.com/mlb/today/sco.html"); getAppletContext().showDocument(link,"main"); } if (click==43) { URL link=new URL("http://espn.go.com/nba/today/sco.html"); getAppletContext().showDocument(link,"main"); } if (click==44) { URL link=new URL("http://espn.go.com/nfl/week/sco.html"); getAppletContext().showDocument(link,"main"); } if (click==45) { URL link=new URL("http://grove.ufl.edu/~cwarner/people/JCanseco.html"); getAppletContext().showDocument(link,"main"); } if (click==46) { URL link=new URL("http://grove.ufl.edu/~cwarner/new/Mac.html"); getAppletContext().showDocument(link,"main"); } if (click==47) { URL link=new URL("http://grove.ufl.edu/~cwarner/people/Magic.html"); getAppletContext().showDocument(link,"main"); } if (click==48) { URL link=new URL("http://grove.ufl.edu/~cwarner/people/Shaq.html"); getAppletContext().showDocument(link,"main"); } if (click==49) { URL link=new URL("http://grove.ufl.edu/~cwarner/new/TAT_main.html"); getAppletContext().showDocument(link,"main"); } if (click==50) { URL link=new URL("http://grove.ufl.edu/~cwarner/new/RR_main.html"); getAppletContext().showDocument(link,"main"); } if (click==51) { URL link=new URL("http://grove.ufl.edu/~cwarner/century/"); getAppletContext().showDocument(link,"main"); } repaint(); status=1; } }} catch (Exception e) { int pts=0;} } } public boolean mouseDown(Event evt, int xm, int ym) { click2=click; try { if (xm>3 & xm<79 & ym>1 & ym<23) click=0; for (int j=1; j<13; j++) { if (xm>x[j]+4 & xmy[j]-1 & ym6 & xm<79 & ym>239 & ym<257) click=51; for (int j=0; j<7; j++) { if (xm>xs[j]+17 & xmys[j]-1 & ymxe[j]+17 & xmye[j]-1 & ymxp[j]+17 & xmyp[j]-1 & ymxam[j]+17 & xmyam[j]-1 & ymxas[j]+17 & xmyas[j]-1 & ymxjs[j]+17 & xmyjs[j]-1 & ymxl[j]+1 & xmyl[j]-1 & ym 12 & click <39) status=2; return true; } public void update(Graphics g) { paint(g); } public void paint(Graphics g) { setBackground(Color.white); offscreenG.setColor(Color.white); offscreenG.fillRect(0,0,162,375); for (int j=0; j<14; j++) { offscreenG.drawImage(main[j],x[j],y[j],this); } for (int j=0; j<7; j++) { if (xs[j]==2) offscreenG.drawImage(sports[j],xs[j],ys[j],this); } for (int j=0; j<5; j++) { if (xe[j]==2) offscreenG.drawImage(ent[j],xe[j],ye[j],this); } for (int j=0; j<5; j++) { if (xp[j]==2) offscreenG.drawImage(people[j],xp[j],yp[j],this); } for (int j=0; j<3; j++) { if (xam[j]==2) offscreenG.drawImage(amiga[j],xam[j],yam[j],this); } for (int j=0; j<2; j++) { if (xas[j]==2) offscreenG.drawImage(ast[j],xas[j],yas[j],this); } for (int j=0; j<4; j++) { if (xjs[j]==2) offscreenG.drawImage(js[j],xjs[j],yjs[j],this); } for (int j=0; j<12; j++) { offscreenG.drawImage(links[j],xl[j],yl[j],this); } g.drawImage(offscreenImg,0,0,this); } }