Professional Documents
Culture Documents
Parameter in Applet
Parameter in Applet
Javatpoint
Home Core Java Servlet
Comment
Forum
Basics of Java OOPs Concepts String Handling Exception Handling Nested Classes Multithreading Synchronization I/O Serialization Networking AWT Event Handling Swing LayoutManager Applet Applet Basics Graphics in Applet Displaying image in Applet Animation in Applet EventHandling in Applet JApplet class Painting in Applet Digital Clock in Applet Analog Clock in Applet Parameter in Applet Applet Communication Reflection API Collection JDBC Java New Features RMI Internationalization
<< prev
next>>
Parameter in Applet
We can get any information from the HTML file as a parameter. For this purpose, Applet class provides a method named getParameter(). Syntax:
import java.applet.Applet; import java.awt.Graphics; public class UseParam extends Applet{ public void paint(Graphics g){ String str=getParameter("msg"); g.drawString(str,50, 50); } }
myapplet.html
<html> <body> <applet code="UseParam.class" width="300" height="300"> <param name="msg" value="Welcome to applet"> </applet> </body> </html>
prev
next>>
Tweet
Like
16k
Like the www.javatpoint.com on facebook / google+ / twitter / subscribe to get latest updates
Sitemap
Core Java
Servlet
JSP
Struts2
Hibernate
Spring
Android
Interview Questions
javatpoint.com is developed to provide easy and point to point learning and training in detail. Examples might be simplified to improve reading and basic und
Tutorials and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. If there is any mistake, please mail
sonoojaiswal1987@gmail.com or sonoojaiswal@javatpoint.com. We provide assurance of 90% interview questions. While using this site, you agree to hav accepted our terms of use and privacy policy. 2011-2013 Javatpoint. All Rights Reserved.