Explain significance of init() & destroy( ) method of applet, Computer Engineering

Assignment Help:

Explain the significance of init() and destroy( ) methods of an applet? Also explain two ways of invoking an applet.

The init( ) method is utilized for fundamental initialization in the applet. This is executed only once throughout the life time of the applet. It is the first method to be invoked while applet is started.

The destroy( ) method is utilized to clear the space from the memory while applet is stopped final ly.

Two ways are there to invoke an applet

  • Executing the applet inside a java compatible web browser or
  • By using an Applet viewer

In a web browser, to execute an applet a short HTML text file is written.

The HTML file to execute SimpleApplet is as follows:

< applet code = "SimpleApplet" width =200 height =60>

The height and width specifies the dimensions of the display area utilized.

To execute SimpleApplet with an applet viewer we will execute HTML file demonstrated above. For illustration if preceding HTML file is termed as app.HTML then the following command will execute a SimpleApplet:

C: \< appletviewer app.HTML


Related Discussions:- Explain significance of init() & destroy( ) method of applet

Cognitive science applications, This branch of AI is concerned with incor...

This branch of AI is concerned with incorporating knowledge from varied disciplines such as biolog neurology psychology mathematics and several linked disciplines. It is typic

How a file can be shared among different users, Discuss the different techn...

Discuss the different techniques with which a file can be shared among different users. Several popular techniques with that a file can be shared among various users are: 1

Cheques vs credit cards, Cheques vs Credit Cards       E-cheques:  E-ch...

Cheques vs Credit Cards       E-cheques:  E-cheques are used for business dealing in e-commerce.  Transactions of these cheques take place on Internet. In this system the elect

Illustrate decimal fixed point representation, Q. Illustrate Decimal Fixed ...

Q. Illustrate Decimal Fixed Point Representation? The point of this representation is to keep the number in decimal equivalent form and not binary as above. A decimal digit is

Java, what is inheritence and all types in java?

what is inheritence and all types in java?

Special theory of relativty, michelson-morley experiment-motivation and exp...

michelson-morley experiment-motivation and experimental setup

Explain the concepts and definitions of e-commerce, The Internet has emerge...

The Internet has emerged as a major worldwide distribution channel for goods, managerial, services, and professional jobs. It has impacted market economics and industry structure,

Asembly language programming, Ask question #Minimum Write a program to mask...

Ask question #Minimum Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of the AX register. 100 words accepted#

Programmed input - output technique for computers, Q. Programmed input - ou...

Q. Programmed input - output technique for computers? Programmed input/output is a useful I/O technique for computers where hardware costs need to be minimised. Input or output

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