![]() |
![]() |
Java Multithreading | |
Creating a Thread | |
Thread Life Cycle | |
Thread Exceptions | |
Thread Synchronization |
Intro. to Graphics class | |
Drawing - Lines , Rectangles | |
Drawing - Circles and Ellipse | |
Drawing - Arcs | |
Drawing - Polygons | |
Drawing - Bar Charts |
Java Programs | |
Java Keywords Dictionary | |
Java Interview Questions |
The Applet tag gives the name of the applet to be loaded and tells the browser how much space the applet requires.
The applet tag starts from < applet> and ends with < /applet>
Every java applet must have following minimum requirnment to display the applet on webpage.
<applet code ="FileName.class" width =300 height =100 > </applet>
<applet codebase ="codepass-url" code ="AppletFileName.class" alt ="alternate-text" name ="applet-instance-name" width ="pixels" height ="pixels" align ="alignment" vspace="vertical space in pixels" hspace="horital space in pixels"> <param name ="name1" value="value1"> <param name ="name2" value ="value2"> .... .... </applet>
In above syntax except code,width and height all other parameters are not compulsary to write.
Parameter | Type | Description |
---|---|---|
code | AppletFileName.class | It specifies the name of the applet class. |
codebase | codebase-url | It specifies the URL of the directory in which the applet resides, if it exists in the same directory of HTML file, then neglect it. |
Width | pixels | It specifies the width space on HTML page that will be reserved for applet |
Height | pixels | It specifies the height space on HTML page that will be reserved for applet |
Name | applet-instance-name | It is the name of the applet used for inter applet communication |
ALIGN | alignment | It specifies where on the page the applet will appear. TOP,BOTTOM,LEFT,RIGHT,MIDDLE, ABSMIDDLE,ABSBOTTOM,TEXTTOP,BASELINE. |
HSPACE | pixels | It specifies the amount of Horizontal black space the browser should leave surrounding the applet. This is used only when ALIGN is set to LEFT or RIGHT. |
VSPACE | pixels | This is used only when a vertical alignment is specified with ALIGN attribute. It specifies the amount of vertical blank space the browser should leave surrounding the applet. |
Alt | alternate-text | It is used to display text when applet is opened from non Java browser. |