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

What is the significance timescale directive, What is the significance Time...

What is the significance Timescale directive? Defines time units and simulation precision (smallest increment). Syntax 'timescale TimeUnit / PrecisionUnit TimeUnit =

What is the protocol used by sap gateway process, What is the protocol used...

What is the protocol used by SAP Gateway process? The SAP Gateway method communicates with the clients based on the TCP/IP Protocol.

What does the ''suppress dialog'' do, What does the 'SUPPRESS DIALOG' do? ...

What does the 'SUPPRESS DIALOG' do? Suppressing of whole screens is possible with this command.  This command permits us to perform screen processing "in the background".  Sup

C++, program to find area under the curve y=f(x) between x=a and y=b , inte...

program to find area under the curve y=f(x) between x=a and y=b , integrate y=f(x)between limits of a and b

Loosely coupled systems, Loosely Coupled Systems These systems do not d...

Loosely Coupled Systems These systems do not distribute the global memory because shared memory concept gives rise to the difficulty  of memory conflicts, which in turn slows d

Determine the uses of defparam, Using defparam Parameter values can be ...

Using defparam Parameter values can be changed in any module instance in the design with keyword defparam. Hierarchical name of the module instance can be used to override para

create a class called auditorium, Create a class called auditorium that sp...

Create a class called auditorium that specifies the seats in the auditorium. The class should include at least one data item: seat (two dimensional array of Char) and at least thre

Write html code to accomplish the web page to insert frame, Write the HTML ...

Write the HTML code to accomplish the web page to insert the frame extending 300 pixels across the page from left side. The HTML code to accomplish the web page is given below

Write an html program segment that contains hypertext links, Write an HTML ...

Write an HTML program segment that contains hypertext links from one document to another . HTML permits any item to be placed as a hypertext reference. Therefore a single word

What is throughput?, If the throughput scales upward as time progresses and...

If the throughput scales upward as time progresses and the number of Vusers enhance, this showing that the bandwidth is sufficient. If the graph were to remain relatively flat as t

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