Jump to content
  • Advertisement
Sign in to follow this  
ju2wheels

[java] JApplet passing parameters

This topic is 4833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok I know im doing this right but its telling its only partially working. I load my applet in an html file and pass the following params: <applet ...> <PARAM NAME="bgColor" VAULE="someColor"> <PARAM NAME="envPropWebPath" VALUE="someWebPath"> <PARAM NAME="webPath" VALUE = "anotherWebPath"> </applet> When I go to get envPropWebPath using getParamter("envPropWebPath") I get a null pointer exception, thus meaning that it cant find the give parameter I assume. I did spell it correctly in both places but its still a no go. Any ideas? I dont assume that there is anything different that needs to be done when you supply more than one parameter is there? I had this working perfectly when I only passed it one parameter...

Share this post


Link to post
Share on other sites
Advertisement
You're right this SHOULD work

check for:

1. spelling mistakes (HTML doesn't have a compiler ;))
2. HTML mistakes (unclosed tags, unclosed " (quotes), etc - see above point)

Share this post


Link to post
Share on other sites
I figured out the problem. getParameter cant be called from within a constructor or it wont work!!!!! Ive got it working now.

*and i did check the spelling ;-D 50 times....

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!