Fundamentals of Windows http://improvejava.blogspot.in/                                   1
ObjectiveOn completion of this period, you would beable to know• Fundamentals of Windows              http://improvejava.b...
RecapIn the previous class, you have leant• Using delegation event model   • Handling keyboard events   • Handling Mouse e...
Fundamentals of Windows• The AWT defines windows according to a class  hierarchy that adds functionality and specificity w...
Fundamentals of Windows                                    contd.. • Fig. 61-1 shows the class hierarchy for Panel and Fra...
Component Class• Component class is at the top of the AWT hierarchy• Component is an abstract class that encapsulates all ...
Container Class• The Container class is a subclass of Component• It has additional methods that allow other  Component obj...
Panel Class• The Panel class is a concrete subclass of  Container• It doesn’t add any new methods; it simply  implements C...
Window Class• The Window class creates a top-level window• A top-level window is not contained within any  other object• I...
Frame Class• Frame encapsulates what is commonly thought  of as a “window”• It is a subclass of Window• It has  –   A titl...
Summary• We have discussed  – The fundamentals of windows  – Frame class hierarchy               http://improvejava.blogsp...
Quiz1. The parent class of Frame class is  a)   Panel  b)   Container  c)   Component  d)   Window                   http:...
Quiz                      contd...2. Whether Frame class has title bar ?  a) True  b) False               http://improveja...
Frequently Asked Questions1. Explain the fundamentals of windows2. Draw the class hierarchy of Frame class                ...
Upcoming SlideShare
Loading in …5
×

Fundamentals of windows.64

433 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
433
On SlideShare
0
From Embeds
0
Number of Embeds
95
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Fundamentals of windows.64

  1. 1. Fundamentals of Windows http://improvejava.blogspot.in/ 1
  2. 2. ObjectiveOn completion of this period, you would beable to know• Fundamentals of Windows http://improvejava.blogspot.in/ 2
  3. 3. RecapIn the previous class, you have leant• Using delegation event model • Handling keyboard events • Handling Mouse events • Adapter class http://improvejava.blogspot.in/ 3
  4. 4. Fundamentals of Windows• The AWT defines windows according to a class hierarchy that adds functionality and specificity with each level• The two most common windows are those derived from – Panel – Frame• Much of the functionality of these windows is derived from their parent classes• A description of the class hierarchies relating to these two classes is fundamental to their understanding http://improvejava.blogspot.in/ 4
  5. 5. Fundamentals of Windows contd.. • Fig. 61-1 shows the class hierarchy for Panel and Frame Component ContainerMenuContainerInterface Window Panel Fig. 61.1 Class hierarchy of Panel and Frame Frame http://improvejava.blogspot.in/ 5 5
  6. 6. Component Class• Component class is at the top of the AWT hierarchy• Component is an abstract class that encapsulates all of the attributes of a visual component• All GUI components are subclasses of Component• It defines over a hundred public methods that are responsible for managing events• A Component object is responsible for remembering the current foreground and background colors and the currently selected text font http://improvejava.blogspot.in/ 6
  7. 7. Container Class• The Container class is a subclass of Component• It has additional methods that allow other Component objects to be nested within it• Other Container objects can be stored inside of a Container• A container is responsible for laying out any components that it contains• It does this through the use of various layout managers http://improvejava.blogspot.in/ 7
  8. 8. Panel Class• The Panel class is a concrete subclass of Container• It doesn’t add any new methods; it simply implements Container• Panel is the superclass for Applet• a Panel is a window that does not contain a title bar, menu bar, or border• Other components can be added to a Panel object by its add( ) method http://improvejava.blogspot.in/ 8
  9. 9. Window Class• The Window class creates a top-level window• A top-level window is not contained within any other object• It sits directly on the desktop http://improvejava.blogspot.in/ 9
  10. 10. Frame Class• Frame encapsulates what is commonly thought of as a “window”• It is a subclass of Window• It has – A title bar – Menu bar – Borders – Resizing corners http://improvejava.blogspot.in/ 10
  11. 11. Summary• We have discussed – The fundamentals of windows – Frame class hierarchy http://improvejava.blogspot.in/ 11
  12. 12. Quiz1. The parent class of Frame class is a) Panel b) Container c) Component d) Window http://improvejava.blogspot.in/ 12
  13. 13. Quiz contd...2. Whether Frame class has title bar ? a) True b) False http://improvejava.blogspot.in/ 13
  14. 14. Frequently Asked Questions1. Explain the fundamentals of windows2. Draw the class hierarchy of Frame class http://improvejava.blogspot.in/ 14

×