Module java.desktop
Package java.awt

Interface MenuContainer

所有已知的实现类:
AbstractButton, AbstractColorChooserPanel, Applet, BasicArrowButton, BasicComboBoxRenderer, BasicComboBoxRenderer.UIResource, BasicComboPopup, BasicInternalFrameTitlePane, BasicInternalFrameTitlePane.SystemMenuBar, BasicSplitPaneDivider, BasicToolBarUI.DragWindow, Box, Box.Filler, Button, Canvas, CellRendererPane, Checkbox, Choice, Component, Container, DefaultListCellRenderer, DefaultListCellRenderer.UIResource, DefaultTableCellRenderer, DefaultTableCellRenderer.UIResource, DefaultTreeCellEditor.DefaultTextField, DefaultTreeCellEditor.EditorContainer, DefaultTreeCellRenderer, Dialog, FileDialog, Frame, JApplet, JButton, JCheckBox, JCheckBoxMenuItem, JColorChooser, JComboBox, JComponent, JDesktopPane, JDialog, JEditorPane, JFileChooser, JFormattedTextField, JFrame, JInternalFrame, JInternalFrame.JDesktopIcon, JLabel, JLayer, JLayeredPane, JList, JMenu, JMenuBar, JMenuItem, JOptionPane, JPanel, JPasswordField, JPopupMenu, JPopupMenu.Separator, JProgressBar, JRadioButton, JRadioButtonMenuItem, JRootPane, JScrollBar, JScrollPane, JScrollPane.ScrollBar, JSeparator, JSlider, JSpinner, JSpinner.DateEditor, JSpinner.DefaultEditor, JSpinner.ListEditor, JSpinner.NumberEditor, JSplitPane, JTabbedPane, JTable, JTableHeader, JTextArea, JTextComponent, JTextField, JTextPane, JToggleButton, JToolBar, JToolBar.Separator, JToolTip, JTree, JViewport, JWindow, Label, List, Menu, MenuBar, MetalComboBoxButton, MetalComboBoxUI.MetalComboPopup, MetalFileChooserUI.FileRenderer, MetalFileChooserUI.FilterComboBoxRenderer, MetalInternalFrameTitlePane, MetalScrollButton, Panel, PopupMenu, Scrollbar, ScrollPane, TextArea, TextComponent, TextField, Window

public interface MenuContainer
所有菜单相关容器的超类。
  • Method Summary

    Modifier and Type
    Method
    Description
    返回此容器正在使用的字体。
    boolean
    已弃用。
    JDK版本1.1后已被dispatchEvent(AWTEvent)取代。
    void
    从菜单中删除指定的菜单组件。
  • Method Details

    • getFont

      Font getFont()
      返回此容器正在使用的字体。
      返回值:
      菜单字体
    • remove

      void remove(MenuComponent comp)
      从菜单中移除指定的菜单组件。
      参数:
      comp - 要移除的菜单组件
    • postEvent

      @Deprecated boolean postEvent(Event evt)
      Deprecated.
      As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
      向监听器发布事件。
      参数:
      evt - 要分发的事件
      返回值:
      发布事件的结果