Introducing Java Applets
page 2 of 5
by Debjani Mallick
Feedback
Average Rating: 
Views (Total / Last 10 Days): 7611/ 186

Need of Applets

Web pages are basically of two types – static and dynamic web pages. Applets are basically used to create dynamic pages. Using HTML we can create only static pages, not dynamic pages. So Java using applet is used to create dynamic pages. There are two types of classes for applet – Applet class and Graphic class. The difference of an applet program from a normal program is that it does not contain the main function (though it can contain main function). So it has no entry point. The program starts executing from some functions present in Applet class. Secondly, an applet program cannot be executed independently as done in case of normal application programs. They must be executed with the help of either applet viewer or with the help of any web browser. If using an applet viewer to run a program, we just need to write the following syntax.

Listing 1

appletviewer classname

When we want to execute an applet program with the help of a web browser, we need to write an HTML file. This file must contain an applet tag. An example of such a file is shown below.

Listing 2

<html>
<head>
<title>
A Simple Example of Applet
</title>
<body>
<applet code ="filename.class" width =“100px” height =“100px”></applet>
</body>
</html>

View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 3 and 5 and type the answer here:

User Comments

Title: Applets   
Name: Sutapa
Date: 6/18/2008 2:02:46 PM
Comment:
Really good article for beginners.....
Title: human face   
Name: ridima
Date: 5/15/2008 10:27:52 AM
Comment:
what if i have to run the human face applet from command prompt
it shows me an error that no main found
Title: java applets   
Name: kunwarjeet singh
Date: 8/15/2007 11:25:33 PM
Comment:
Too good for beginners.
Title: java applets   
Name: venkata subbaiah
Date: 8/13/2007 3:43:13 AM
Comment:
emerging one for quick learning
Title: Fabulous   
Name: Nikita
Date: 7/22/2007 9:06:43 AM
Comment:
Go on
Title: Too good   
Name: Fred
Date: 7/18/2007 11:53:32 AM
Comment:
Its a nice article for beginners
Title: good   
Name: Rishi
Date: 7/13/2007 1:10:32 PM
Comment:
A very good article
Title: Good   
Name: Chandrakanta Kar
Date: 7/13/2007 7:57:18 AM
Comment:
It is fundamental level article, any way nice
Title: abhi   
Name: gr8
Date: 7/6/2007 12:53:16 PM
Comment:
keep up the good work!!!!
Title: something really gooe   
Name: Surya
Date: 7/6/2007 12:18:03 PM
Comment:
Its really good
Title: Good one   
Name: sdwsadxa
Date: 7/4/2007 11:35:48 AM
Comment:
Keep it up
Title: Nice   
Name: Tim
Date: 7/4/2007 11:35:05 AM
Comment:
Nice job
Title: Good work   
Name: Sid
Date: 7/4/2007 11:34:34 AM
Comment:
The article is worth reading.
Title: Good   
Name: Nash
Date: 7/3/2007 3:21:39 AM
Comment:
Really helpful...good job

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 8/29/2008 7:45:52 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search