• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Container

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
Which cannot be added to a Container?
a) Applet b) Component c)Container d) Panel
e) MenuItem or Menu or MenuComponent.
why is the answer e?
I think none is the answer.
or is the question supposed to be "cannot be directly added..."?
then answer e) sounds right....
I am confused.

Thanks heaps
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sean,
You will understand, if you go through thr' hierarchy.
Object->MenuComponent->
The sub classes of MenuComponent are
MenuBar
MenuItem
Menu etc.
Here Super class is not "Container" hence you can not add
the above items to a Container.
solaiappan
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wait a second here Component implements MenuContainer - inherited by Container. You can add a PopupMenu to any Component. The inheritance of Object->MenuComponent-> has nothing to do with it.
Only a Frame can have a MenuBar, maybe thats what the question was trying to get at.
Bill
 
P SOLAIAPPAN
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi William,
I thing the following explanation is ok.
Container itself is a component, button,applet and component are component. But menu extends MenuComponent which extends Object so it is not a component.
Hence Menu canot be added to a container.
If am wrong, correct me.
solaiappan.


[This message has been edited by P SOLAIAPPAN (edited October 29, 2000).]
 
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic