Java's primary contribution to the Web, however, has been in the form of Java applets, which are self-contained, mini-executable programs. These programs, named with the .class suffix, can be placed right on the web page, like a graphic.
Advantages and Disadvantages
Applets are ideal for web distribution for the following reasons:
Of course, every utopian technology has its darker side, and unfortunately, in the real world, browsers can be temperamental in the way they handle Java applets. Browsers are notorious for crashing in the presence of a computation-hungry applet. In general, it also takes browsers a long time to initialize Java, which tends to chase users away. There was a great buzz among web developers when Java applets first hit the scene, but since then enthusiasm has waned in the face of performance issues and the development of other web multimedia solutions.
What Applets Can Do
What can't applets do?! Java applets are used for everything from simple animations to flight simulators. Because Java allows for computations on-the-fly, they are useful for programs that interact with user input. Not surprisingly, a large percentage of Java applets are games, but applets are also used for more practical purposes, such as calculators and spreadsheets. More interestingly, they can serve live data (news headlines, stock quotes, sports scores, etc.) and let users navigate through complex data relationships.
There are probably thousands of Java applets out there. The following is just a smattering of the types of things they can do:
Where to Get Applets
If you need a customized applet for your site, your best bet is to hire a programmer to create one to your specifications. However, there are a number of applets available for free or for a licensing fee that you can download from libraries on the Web.
Downloading and Using Java Applets
In addition to these, there are a number of small businesses with Java applet packages for sale or available for a nominal licensing fee. Because the list is constantly changing.
It is fairly easy to download an applet and add it to a web page. The steps below follow the instructions provided by the JavaBoutique for downloading applets from their site, but they can be used for applets from any resource.
Adding an Applet to a Page
There are currently two methods for adding an applet to a web page: the <object> tag, recommended by HTML 4.01, and the better-supported <applet> tag.
The W3C has deprecated the <applet> tag and all its attributes in favor of the <object> tag. Despite this, the <applet> tag may still be the better choice, because browser support for <object>-embedded applets is so inconsistent that it is difficult to find an approach that works in all browsers. In addition, some applets require that the <applet> tag be used, so read the documentation for the applet first. This section looks at both methods.
Adding applets with <object>
You can add a simple, self-contained applet to an HTML document using the <object> tag like this:
The classid attribute points to the applet itself (its implementation). It has the same function as the code attribute in the <applet> tag when used for Java applets. Classid may not contain any pathname information, so the location of the class file is provided by the codebase attribute.
When using <object> for Java applets, the object tag may contain a number of parameter (<param>) tags, as with the <applet> tag. (Note that Netscape 4.0 does not support <param> tags within the <object> tag, so it may not play applets correctly if placed this way.)
The following is an example of an applet with additional parameters:
Adding applets with <applet>
The <applet> tag is a container for any number of parameter (<param>) tags. The following is an example of how an <applet> tag for a game might look:
The opening applet tag contains a number of standard attributes:
Tells the browser which applet will be used. Applets end with the suffix .class or .jar. This attribute is required.
This tells the browser in which directory to find the applets. If the applets are in the same directory as the page, the codebase attribute is not necessary.
These specify the pixel dimensions of the "window" the applet will occupy. These attributes are required for the Java applet to function properly.
The <applet> tag can also take many of the same attributes used for images, such as alt (for providing alternative text if the applet can not be displayed), align (for positioning the applet in the flow of text), and hspace/vspace (used in conjunction with align).
Special parameters for the applet are provided by any number of parameter tags (sometimes there are none). The <param> tag always contains the name of the parameter (name=) and its value (value=). Parameters provide special settings and controls that are specific to the particular applet, so you need to follow the parameter coding instructions provided by the programmer of the applet.
Web Designing Related Interview Questions
|HTML Interview Questions||HTML 5 Interview Questions|
|Flash Interview Questions||Graphic Design Interview Questions|
|Illustrator Interview Questions||Dreamweaver Interview Questions|
|UI Developer Interview Questions||Dreamweaver CS3 Interview Questions|
|CSS Advanced Interview Questions||Web Developer Guide Interview Questions|
|Log Shipping Interview Questions||Spring Boot Interview Questions|
|UI Designer Interview Questions||Bootstrap 4 Interview Questions|
Web Designing Related Practice Tests
|HTML Practice Tests||HTML 5 Practice Tests|
|Flash Practice Tests||Graphic Design Practice Tests|
|Illustrator Practice Tests||Dreamweaver Practice Tests|
|UI Developer Practice Tests||Dreamweaver CS3 Practice Tests|
|Web Developer Guide Practice Tests||Advanced jQuery Practice Tests|
Web Designing Tutorial
Designing For A Variety Of Browsers
Designing For A Variety Of Displays
Web Design Principles For Print Designers
A Beginners Guide To The Server
Printing From The Web
Structural Html Tags
Adding Images And Other Page Elements
Specifying Color In Html
Cascading Style Sheets
Server Side Includes
Designing Graphics With The Web Palette
Audio On The Web
Video On The Web
Flash And Shockwave
Introduction To Smil
Introduction To Dhtml
Introduction To Xml
Wap And Wml
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.