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

Explain advantage of static storage class, Explain advantage of static stor...

Explain advantage of static storage class The second and more subtle use of 'static' is in connection with external declarations. With external constructs it provides a privacy

Explain the instruction decode, Q. Explain the Instruction Decode? Ins...

Q. Explain the Instruction Decode? Instruction Decode: This phase is performed under control of Control Unit of computer. The Control Unit determines the operation which is t

Define both fork and vfork, How and when race conditions happen in process ...

How and when race conditions happen in process control? How can it be avoided? b. Differentiate among following functions giving related syntax: (i) fork and vfork (ii) w

State the relative addressing, State the Relative addressing The locati...

State the Relative addressing The location of data is specified relative to current value of the program counter. This is helpful for specifying location of data which is given

Calculate switching capacity in a two stage network, In a two stage network...

In a two stage network there are 512 inlets and outlets, r=s=24. If the probability that a given inlet is active is 0.8, calculate: Switching capacity Given: N =M =512, α

Full adder, design a FULL adder with two half adders and an or gate

design a FULL adder with two half adders and an or gate

Intelligent systems assignment, This logbook should be used to record decis...

This logbook should be used to record decisions, ideas, work done by your group on this assignment. Each group should keep one logbook, which must be submitted along with your sour

Define the difference between static ram and dynamic ram, Define the differ...

Define the difference between static RAM and dynamic RAM? The RAM family comprises two important memory devices that are static RAM (SRAM) and dynamic RAM (DRAM). The main diff

Explain basic working of mainframes, Q. Explain Basic working of Mainframes...

Q. Explain Basic working of Mainframes? Mainframe computers are normally 32-bit machines or higher. These are suited to large organizations, to manage high volume applications.

What is shift operation, Q. What is Shift operation? Shift: Shift ope...

Q. What is Shift operation? Shift: Shift operation is employed for transfer of bits either to left or to right. It can be used to comprehend simple arithmetic operation or da

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