Advanced GUI Applications Part II
- Contents
- Introduction to Applets
- Applet Limitations
- Introduction to HTML
- Document Structure Tags
- Text Formatting Tags
- Breaks in Text
- HTML Links
- Creating Applets With Swing
- Running an Applet
- Using
appletviewer
- Java Applet Tutorial
Introduction to Applets
Java Applets
Applets are Java programs designed to work within a Web page.
If a user opens the Web page with a Java-enabled browser, the applet is displayed inside the browser window.
It appears to the user that the applet is part of the Web page.
Applets are stored on a Web server along with the site’s Web pages.
Applets associated with a viewed Web page are transmitted to the user’s system.
Once the applets are transmitted, the user’s system executes them.
Applets can be used to extend the capabilities of the Web page.
Hypertext Markup Language (HTML)
Web pages are transmitted to the user’s system as HTML.
HTML is static content, whereas Applets are dynamic.
They are stored and executed on the local computer.
Applet Limitations
For security purposes, by default, Applets cannot:
access the local computer file system.
run any other program on the user’s system.
retrieve certain information about the users or their systems.
make network connections with any system except the server from which the Applet was transmitted.
Introduction to HTML
HTML is the language of Web pages.
Hypertext can contain a link to other content on the Web page or another Web page.
A markup language allows designers to “mark up” a text file by inserting special instructions.
These instructions tell the browser how to format the text and create any hypertext links.
A Web page is often created as a text file.
It contains HTML instructions (known as tags).
It contains the text that should be displayed on the Web page.
It typically has a
.html
file extension.
The tags instruct the browser...
how to format the text
where to place images
what to do when the user clicks on a link.
Most HTML tags have an opening tag and a closing tag.
The tags are enclosed in angle brackets.
The closing tag is preceded by a forward slash.
For example: