View Single Post
  #1 (permalink)  
Old 08-03-2007, 06:58 PM
christina christina is offline
Member
 
Join Date: Jul 2007
Posts: 39
christina is on a distinguished road
problems when I try to send parameters
HTML Parameters returned as null

Can anyone tell me what I've done wrong?
Code:
<HTML> <HEAD> <TITLE>pairs</TITLE> </HEAD><BODY> <APPLET CODE="GridExample" WIDTH=1000 HEIGHT=540> <PARAM NAME="w" VALUE="ok"> </APPLET> </BODY> </HTML>
this is the code:
Code:
import java.awt.*; import java.applet.*; public class GridExample extends Applet { public Graphics g; Image pic1, pic2, pic3; String CardText; public void init() { pic1=getImage(getCodeBase(),"fishes.jpg"); pic2=getImage(getCodeBase(),"haben.jpg"); pic3=getImage(getCodeBase(),"avoir.jpg"); CardText=getParameter("word1"); } public GridExample() { this.setLayout(new GridLayout(5,9, 0, 0)); for (int counter=0; counter<45; counter++) { this.add(new Button (CardText + counter)); } } public Insets getInsets() { return new Insets(0, 0, 25, 0); } public void paint (Graphics gr) { g=gr; g.drawImage(pic1,0,0,this); } }
Reply With Quote
Sponsored Links