Appl clas nd architect.56
Upcoming SlideShare
Loading in...5
×
 

Appl clas nd architect.56

on

  • 474 views

 

Statistics

Views

Total Views
474
Views on SlideShare
256
Embed Views
218

Actions

Likes
0
Downloads
4
Comments
0

4 Embeds 218

http://improvejava.blogspot.in 195
http://improvejava.blogspot.com 19
https://www.google.co.in 3
http://improvejava.blogspot.com.es 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Appl clas nd architect.56 Appl clas nd architect.56 Presentation Transcript

  • Applet classes and Applet Arcrhitecture http://improvejava.blogspot.in/ 1
  • ObjectivesOn completion of this period, you will be able to learn• Applet classes• Applet architecture http://improvejava.blogspot.in/ 2
  • RecapIn the last class, you have studied about different steps involved in executing an applet• Applets do not need a main( ) method• Applets must be run under an appletviewer or a Java compatible browser http://improvejava.blogspot.in/ 3
  • Applet Classes and Its Methods• Applet class is defined in java.applet java.lang.Object package• Applet is a subclass of Panel class java.awt.Component which is defined in java.awt package• Panel is a subclass of Container class java.awt.Container• Container is a sub class of Component class java.awt.Panel• Component is a subclass of Object class java.applet.Applet• Object is the root of all Java classes and is defined in java.lang package Fig. 56.1 Applet class hierarchy http://improvejava.blogspot.in/ 4
  • Applet Classes and its Methods contd..• Applet provides all necessary support for applet execution, such as starting and stopping• It also provides methods that load and display images, and and play audio clips http://improvejava.blogspot.in/ 5
  • Applet Classes and its Methods contd..• These classes provide support for Java’s window-based, graphical interface• Applet provides all of the necessary support for window-based activities http://improvejava.blogspot.in/ 6
  • Applet MethodsThe following table shows the methods of Applet class Table.56.1 Applet methods http://improvejava.blogspot.in/ 7
  • Applet Methods contd...Table.71.2 http://improvejava.blogspot.in/ 8
  • Applet Architecture• An applet is a window-based program• Applets are event driven• An applet waits until an event occurs http://improvejava.blogspot.in/ 9
  • Applet Architecture contd..• AWT notifies the applet about an event by calling an event handler• After this, the applet must take appropriate action and then quickly return control to the AWT http://improvejava.blogspot.in/ 10
  • Applet Architecture contd..• User interacts with the applet• These interactions are sent to the applet as events to which the applet must respondFor example when the user clicks a mouse inside the applet’s window, a mouse-clicked event is generated http://improvejava.blogspot.in/ 11
  • Applet Architecture contd..• If the user presses a key in the applet’s window has input focus, a key press event is generated• When the user interacts with one of these controls (Buttons and Check boxes, etc), an event is generated http://improvejava.blogspot.in/ 12
  • Summary In this class, you have learnt• Applet classes• Applet methods• Applet architecture http://improvejava.blogspot.in/ 13
  • Quiz1. Applets are event driven programs a) true b) false http://improvejava.blogspot.in/ 14
  • Quiz2. AWT notifies the applet about an event by calling an event handler a) true b) false http://improvejava.blogspot.in/ 15
  • Frequently Asked Questions• List and Explain the different Applet classes and methods• Write about Applet architecture http://improvejava.blogspot.in/ 16