Mega Code Archive

 
Categories / Java Tutorial / Development
 

Access applet parameters

import javax.swing.JApplet; public class MainClass extends JApplet {   public void init() {     System.out.println(getParameter("text"));   } } Create an HTML document that contains the applet. <html>     <head>     <title>Marquee</title>     </head>     <applet code="ScrollApp.class" width=400 height=60>     <param name = "text" value = "The Java(tm) How To">     </applet>     <hr size=4>          </html>