sitestudio, click here to enter!


sitestudio

sitestudio resources brought to you by aldenhosting.com

sitestudio

sitestudio information is available by clicking above

Since 1998, Alden Hosting is a provider of business-class Web hosting to small- and medium-sized businesses, providing professional, efficient, and reliable services. We provide everything you need to get your business on the Internet. We make it easy and affordable. Alden Hosting's feature-rich hosting plans and excellent 7 days a week toll-free customer support empower you to efficiently build a Web business that will grow with your changing needs.

Site Map
sitestudio sitestudio Passing Parameters to AppletsThe area between the opening and closing APPLET tag is also used to pass parameters to applets. This is done through the use of the PARAM HTML tag and the getParameter method of the java.applet.Applet class.To demonstrate this we'll convert HelloWorldApplet into a generic string drawing applet.

sitestudio To do this we'll need to pass the applet parameters that define the string to be drawn.import java.applet.Applet; import java.awt.

sitestudio Graphics; public class DrawStringApplet extends Applet { String input_from_page; public void init() { input_from_page = getParameter("String"); } public void paint(Graphics g) { g.drawString(input_from_page, 50, 25); } }Now you need to create an HTML file that will include your applet. The following simple HTML file will do: <HTML> <HEAD> <TITLE> Draw String </TITLE></HEAD><BODY> This is the applet:<P> <APPLET codebase="classes" code="DrawStringApplet.class" width=200 height=200><PARAM name="String" value="Howdy, there!"></APPLET></BODY> </HTML> Of course you are free to change "Howdy, there!" to a string of your choice. Note that this allows you to change the output of the applet without changing or recompiling the code.

sitestudio You're not limited to one parameter either. You can pass as many named parameters to an applet as you like.The getParameter method is straightforward. You give it a string that's the name of the parameter you want. You get back a string that's the value of the parameter.

sitestudio

Web Hosting Links Portal
Web Hosting JSP Hosting Tomcat Hosting MySQL Hosting servlets Hosting
Web Site Hosting JSP Hosting Tomcat Hosting MySQL Hosting servlets Hosting
JSP Web Hosting JSP Web Hosting
Servlet Web Hosting Servlet Web Hosting
Alden Trading Alden Shoes ebootery Minnetonka Moccasins myMoccasins
Protecting Your Assets Portal
Offshorelaw links Offshorelaw
INTERNET LARGEST NEW CAR BUYING SERVICE
Where You will Find every wedding service you will need
Where You will Find every wedding service you will need
unemployment benefit services
unemployment benefit services unemployment benefit services
Menu Paper Menu Paper
Dancing Waters Dancing Waters

sitestudio