-
Grabbing Paramaters from a web page. - [SOLVED]
I am trying to grab text from the paramaters values in an html file. Well, before I get to that point, I am getting an error in my applet during compile time. The error message reads:
cannot find symbol - method getParamater(java.lang.String)
at the line:
pString = getParamater("nameofparam");
is highlighted. This is in BlueJ.
PHP Code:
import java.applet.*;
import java.awt.*;
import javax.swing.*;
class MessagePanel2 extends JPanel {
public void paintComponent(Graphics grafObj) {
super.paintComponent(grafObj);
grafObj.drawString(Wel3.myText, 50, 50);
}
}
public class Wel3 extends JApplet
{
// instance variables - replace the example below with your own
static String myText;
/**
* Called by the browser or applet viewer to inform this JApplet that it
* has been loaded into the system. It is always called before the first
* time that the start method is called.
*/
public void init()
{
// provide any initialisation necessary for your JApplet
Container messageArea = getContentPane();
String pString;
pString = getParamater("nameofparam");
if (pString == null)
myText = "html page parameter missing";
else myText = pString;
MessagePanel2 myMessagePanel = new MessagePanel2();
messageArea.add(myMessagePanel);
}
public void start()
{
// provide any code requred to run each time
// web page is visited
}
/**
* Called by the browser or applet viewer to inform this JApplet that
* it should stop its execution. It is called when the Web page that
* contains this JApplet has been replaced by another page, and also
* just before the JApplet is to be destroyed.
*/
public void stop()
{
// provide any code that needs to be run when page
// is replaced by another page or before JApplet is destroyed
}
public void destroy()
{
// provide code to be run when JApplet is about to be destroyed.
}
}
Last edited by gjon; 10-30-2005 at 10:34 AM.
-
getParamater ? hmm...
it's getParameter
PS: I need new glasses too
eschew obfuscation
-
Similar Threads
-
By Travis in forum ASP.NET
Replies: 0
Last Post: 06-04-2002, 08:51 AM
-
By Ray Smith in forum Web
Replies: 4
Last Post: 08-10-2001, 04:35 PM
-
By Jawahar Rajan in forum Web
Replies: 1
Last Post: 06-20-2001, 10:04 AM
-
By Jon Crosse in forum Architecture and Design
Replies: 0
Last Post: 11-27-2000, 01:56 PM
-
By Robert Scoble in forum ASP.NET
Replies: 0
Last Post: 07-20-2000, 04:11 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|