Class FontChangingMenu

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, MenuElement, SwingConstants

public class FontChangingMenu extends JMenu
This class extends the JMenu class to ensure font changes are propagated into the subsidiary JPopupMenus and JMenuItems.
See Also:
  • Constructor Details

    • FontChangingMenu

      public FontChangingMenu(Action a)
      Constructs a menu whose properties are taken from the Action supplied.
      Parameters:
      a - an Action
    • FontChangingMenu

      public FontChangingMenu(String s)
      Constructs a new JMenu with the supplied string as its text.
      Parameters:
      s - the text for the menu label
    • FontChangingMenu

      public FontChangingMenu(String s, boolean b)
      Constructs a new JMenu with the supplied string as its text and specified as a tear-off menu or not.
      Parameters:
      s - the text for the menu label
      b - can the menu be torn off (not yet implemented)
  • Method Details

    • setFont

      public void setFont(Font font)
      Sets the font for this component.
      Overrides:
      setFont in class JComponent
      Parameters:
      font - the desired Font for this component