MenuContainer is an interface implemented by the three menu containers: Frame, Menu, and MenuBar; Java 1.1 adds a fourth, Component. You should never need to worry about the interface since it does all its work behind the scenes for you. You will notice that the interface does not define an add() method. Each type of MenuContainer defines its own add() method to add menus to itself.
The getFont() method should provide an object's font. MenuItem implements this method, so all of its subclasses inherit it. MenuBar implements it, too, while Frame gets the method from Component.
The postEvent() method should post Event e to the object. MenuComponent implements this method, so all of its subclasses inherit it. (Frame gets the method from Component.)
The remove() method should remove the MenuComponent component from the object. If component was not contained within the object, nothing should happen.
This HTML Help has been published using the chm2web software. |