javablogspot

Just another WordPress.com weblog

Applet Basics

Posted by damuchinni on March 5, 2009

Before Java, you used HTML (the hypertext markup language) to describe the layout of a web page. HTML is simply a vehicle to indicate elements of a hypertext page.
For example,
tag. (This is one of the general rules for tags: a slash followed by the name of the element indicates the end of the element.)

The basic idea of how to use applets in a web page is
simple: the HTML page must tell the browser which applets to load and then where to put each applet on the web page. As you might expect, the tag needed to use an applet must tell the browser the following:

• From where to get the class files;

• How the applet sits on the web page
(size, location, and so on).

The original way to embed a Java applet was via an APPLET tag with parameters that gave the information listed above. The W3 Consortium has suggested switching to the more versatile OBJECT tag, and the older APPLET tag is deprecated in the HTML 4.0 specification.
The latest browsers will recognize both tags, but you should keep in mind that older browsers do not. We will cover the basics of using these tags a little later
The browser then retrieves the class files from the Net (or
from a directory on the user’s machine) and automatically runs the applet, using its Java Virtual Machine.

Advertisements

One Response to “Applet Basics”

  1. Shelley said

    Do you know if you can run java applets successfully on a wordpress blog? I am specifically wanting to use a crossword puzzle application that posts interactive crosswords onto a web page on wordpress? Would joomla work better?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: