| Richard Perreault 2006-03-23, 10:04 pm |
| I have a program that uses an applet to transfer parameters from an Html
page. And transfer them to a constructor. This works very well, I did add
println commands to make sure it functions properly. When I open the applet
which loads a frame. I see the variables even before the frame is loaded. My
problem is that these variables are not global. If I do not create the
variable at the beginning of the Frame I get an error as symbol not found.
Here is some snippets of my program.
This is the applet
Url = getParameter("Url");
HTTP = getParameter("HTTP");
System.out.println(Url);
System.out.println(HTTP);
//try {
//finalapp being loaded
//This is how you pass parameters from an applet to a frame!
window = new finalapp (Url,HTTP,"Pop-Up Window");
//catch (IOException e) {
//System.out.println("Error: "+ e.getMessage());
//}
And this is the constructor of the Frame
// Constructor
public finalapp(String Url,String HTTP,String title)
{
super(title);
System.out.println(Url+" "+HTTP);
// Read the Questions file;
// Frame Initialization
Can anyone please tell me how to make the Url and HTTP global variables in
the Frame.
|