Explain the applet element, Programming Languages

Assignment Help:

Explain the applet Element ?

Applets are embedded in web pages by using the and tags. The APPLET element is same to the IMG element. Like IMG APPLET references a source file in which is not part of the HTML page on that it is embedded. IMG elements do this along with the SRC attribute. APPLET elements do this along with the CODE attribute. The CODE attribute tells the browser whereas to look for the compiled .class file. It is associative to the location of the source document. If the applet resides somewhere other than the similar directory as the page it lives on, you don't just provide a URL to its location. Rather you point at the CODEBASE. The CODEBASE attribute contains a URL that points at the directory where the .class file is. The CODE attribute is the name of the .class file itself. For instance if on the HTML page of the previous section you had written

< applet code="HelloWorldApplet" codebase="classes"
width="200" height="200">
< /applet>
then the browser would have tried to find HelloWorldApplet.class in the classes directory in the similar directory as the HTML page that involved the applet. Instead if you had written
< applet code="HelloWorldApplet"
codebase="https://www.foo.bar.com/classes" width="200" height="200">
< /applet>
In short the applet viewer will try to retrieve the applet from the URL given through the formula (CODEBASE + "/" + code). Once this URL is created all the usual rules about assoiative and absolute URLs apply.
If the applet is in a non-default package, then the full package qualified name must be used. For instance,
< applet code="com.macfaq.greeting.HelloWorldApplet"
codebase="https://www.example.com/classes" width="200" height="200">
< /applet>

The HEIGHT and WIDTH attributes work very as they do with IMG, specifying how big a rectangle the browser should set aside for the applet. These numbers are specified in pixels and are needed.


Related Discussions:- Explain the applet element

Str_concat procedure, Write a procedure named Str_concat that concatenates ...

Write a procedure named Str_concat that concatenates a source string to the end of a target string. Sufficient space must exist in the target string to accommodate the new characte

C++ language introduces, C++ language introduces object-oriented programmin...

C++ language introduces object-oriented programming (OOP) features to C language. It offers classes, which provide the four features commonly present in OOP (or some non-OOP) langu

Program for read minimum three command line arguments, 1. Write a program t...

1. Write a program that reads a minimum of three command line arguments and displays the program's results. a. Command Line arguments:  i. The first argument will be the program

Write a recursive procedure that computes number in integer, (a) Write a re...

(a) Write a recursive procedure (digits n) that computes the number of digits in the integer n using a linear recursive process. For example, (digits 42) should return 2 and (digit

What is dynamic binding, Dynamic Binding: - Binding refers to the linking ...

Dynamic Binding: - Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding (late binding) means that the code associa

Implement a two-dimensional table in prolog, Implement a two-dimensional ta...

Implement a two-dimensional table in Prolog. Your program will contain: 1.  An insert_entry predicate that takes a table, row, column and an entry and inserts the entry at the g

Program converts character array to signed decimal integer, 1. Write a func...

1. Write a function that converts a character array to a signed decimal integer. Function prototype must be as follows: int asciiToInt( char *str, unsigned char* eflag) YOU MAY NO

Understanding the html document object model, At the core of DHTML is the D...

At the core of DHTML is the Document Object Model, or DOM, which represents the HTML or XML of a Web page that is displayed in a browser. The Document Object Model that represents

Learning when and how to use a while loop, 1.  A function that produces the...

1.  A function that produces the Collatz sequence and counts the number of terms. 2.  A main function that calculates interesting values about the Collatz sequence. 1.The Col

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd