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.
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
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
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).]
I do some of my very best work in water. Like this tiny ad: