Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

Explain the procedure for converting an applet to an application.

Explain the procedure for converting an applet to an application.

Answers


gregory
? Build a Java JApplet (or Applet). (Let’s assume you name the class AppletToApplication).
? Change the name of your applet’s init() method to be the same as the name of your class (in this
case: AppletToApplication). This is now the constructor method for the class.
? Delete the word void in the header of your new AppletToApplication constructor, since a
constructor has no return type.
? Alter the class header so that it extends Frame rather than Applet (or JApplet) .
? Create a new method called main.
? Delete the import for the class Applet, since it is now redundant.
? Add window methods (e.g., windowClosing to handle the event which is the user clicking on the
close window button, and others).
? Make sure that the program does not use any of the methods that are special to the Applet class –
methods including getAudioClip , getCodeBase , getDocumentBase , and getImage
gregorymasila answered the question on January 24, 2018 at 17:43

Answer Attachments

Exams With Marking Schemes

Related Questions