/** * Posts the specified event to the menu. This method is part of the Java 1.0 event system * and it is maintained only for backwards compatibility. Its use is discouraged, and it may not * be supported in the future. * * @param evt the event which is to take place * @deprecated As of JDK version 1.1, replaced by <code>dispatchEvent(AWTEvent)</code>. * @since JDK1.0 */ public boolean postEvent(Event evt) { MenuContainer parent = this.parent; if (parent != null) { parent.postEvent(evt); } return false; }
/** * Gets the font used for this menu component. * * @return the font used in this menu component, if there is one; <code>null</code> otherwise. * @see java.awt.MenuComponent#setFont * @since JDK1.0 */ public Font getFont() { Font font = this.font; if (font != null) { return font; } MenuContainer parent = this.parent; if (parent != null) { return parent.getFont(); } return null; }