PPT12_Applets - Java Applets Applet Basics A Java Applet is...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Java Applets Applet Basics A Java Applet is a program that runs within a web page. Can be used for developing the view layer of an application. Can be used to develop client based applications. Multimedia components are easier to create in an Applet than in an Application. Limitations: Applets can be a security risk. Cannot perform file I/O on client machine. Does not have the menu classes available. Using the Applet Class Writing a Simple Applet Import: Applet Class from java.applet package Create a user defined class that inherits from Applet Executed in a browser window Requires HTML file Applet Class java.lang.Object java.awt.Component java.awt.Container java.awt.Panel java.applet.Applet Applet Class Selected Methods void init() Called by the browser or applet viewer to inform this applet that it has been loaded into the system. void start() Called by the browser or applet viewer to inform this applet that it should start its execution. void stop() Called by the browser or applet viewer to inform this applet that it should stop its execution. public void paint(Graphics g)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

PPT12_Applets - Java Applets Applet Basics A Java Applet is...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online