Java Applet Parameter Example

Java Applet Parameter Example

This Program about Java Applet Parameter demonstrate how to pass values using parameter. This will be very useful when you would like to specify some special value for some task. Lets discuss above example in details that here I have passed two numbers using parameter. I would like to do simple sum of the two numbers and would like to display in Applet.  You can pass any kind of parameters as per your requirement and you can use this value in your java applet program.

 

 

Most important point to remember here is that :

  • To pass extra value from html file you have to use param tag inside Applet tag.
  • To receive parameter value you need to use getParameter() method in Applet
  • Be sure that it will always send your values as String, so you need to convert it into your appropriate datatype before processing.

Adarsh Patel

My Self Adarsh Suryakant Patel. Currently I am working as Assistant Professor at Parul Instiute of Engineering and Technology, MCA Department, Limda, Vadodara. Major Responsibility : * Lectures * Organizing Training and Expert Sessions for * Placement and Recruitment * Faculty Representative