Explain the complete syntax for using the Applet tag.

Explain the complete syntax for using the Applet tag.

The <Applet> tag has the following attributes:
Code: To specify the .class
Width: To indicate the width of the applet window at first time loading.
Height: To indicate the height of the applet window at first time loading.

Example:
<Applet code=RegistrationForm.class width=400 height=400>
Welcome to the world of applets
</Applet>

Syntax for using the Applet tag
<applet code="Applet123.class" width=50 height=50>
</applet>

The browser is informed to load the applet whose compiled code is in Applet123.class and to set the size of the applet to 50x50 pixels.
Where should we put applet class files, and how to indicate their location using the Applet tag?
An applet class file may present in any of the folder. The .class file name along with its current path...
Explain the methods that control a Applet's on-screen appearance, update and paint.
To refresh a page in an applet window without flashing, the update() method is to be overridden...
Explain how Java interacts with database.
Java interacts with database using an API called Java Database Connectivity. JDBC is used to connect to the database...
Post your comment