File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exam Cram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Exam Cram" Watch "Exam Cram" New topic

Exam Cram

Vivek Shrivastava
Ranch Hand

Joined: Jun 03, 2000
Posts: 277
Hello to all,
I know i should not ask this type of question but u never know from where u will get something to learn.
There is statement in exam cram book at page # 258.

All operating system events are turned into java.awt.Event objects. The JVM then searches the containment hierarchy and graphical component hierarchy trying to locate a method that can handle the event.

My question is here what is this containment hierarchy and graphical component hierarchy ?
please explain it to me. i would really appreciate it.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Vivek,
"Graphical Component Hirearchy" means The class hierarchy of the Graphical Components like
--> Container
--> Window
--> Frame

Whereas "Containment Hierarchy" means in a GUI Which container contains what components or containers and so on.
For example consider a Frame (F1) has Panel (P1) which inturn contains another Panel(P2) and Panel P2 contains a Button (B1)
Frame (F1)
--> Panel (P1)
--> Panel (P2)
--> Button (B1)
strictly this is not actually a hierarchy in java terms.
Vivek Shrivastava
Ranch Hand

Joined: Jun 03, 2000
Posts: 277
Thanks Praveen,
really appreciate your time and effort.
I agree. Here's the link:
subject: Exam Cram
It's not a secret anymore!