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 doubt in awt components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt in awt components " Watch "doubt in awt components " New topic

doubt in awt components

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi all,
This is a question from exam cram.
Q.Which of the following AWT components can have a menu,either as a menu bar or pop-up menu,attached to it?
I think the answer is only A.But the key ans. is A,B,C,D.
Why is it so?Please help me.Thanks in advance.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
anyone help me

Joined: Jun 26, 2000
Posts: 25
A B C D is right. Popup menu can be added to all.
Reason is that all of these inherit java.awt.Component and Component implements java.awt.MenuContainer
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
thanks.What about menu and menubar.
I think only frame can have a menubar and no idea about menu.Please help.
I agree. Here's the link:
subject: doubt in awt components
Similar Threads
Are the topics of layout manager and painting out of picture of scjp1.4?
Exam Topics
Menu problem
Rating of Java Books
JMenu always behind the Panel