Hi All, Can Anyone help me with this. An detailed explaination is appreciated. Which cannot be added to a Container ? 1. An Applet 2. A Component 3. A Container 4. Menu 5. Panel. Thx in Advance.
You can add anything descended from java.awt.Component to a java.awt.Container. In that list, only Menu is not descended from Component. A Menu object can only be added to a MenuBar. Bill
You can add a popup menu to a component (and thus container). As per java.awt.Component API public void add(PopupMenu popup) - Adds the specified popup menu to the component.
Bring me the box labeled "thinking cap" ... and then read this tiny ad: