PopupMenu

Swing components: JPopupMenu
Swing tutorial: How to Use Menus

Properties

PopupMenu Properties

Colors

UI Key Style Key v2 Description
PopupMenu.background background background color
PopupMenu.foreground foreground unused
PopupMenu.borderColor borderColor border color

Sizes

UI Key Style Key v2 Type Description
PopupMenu.borderInsets borderInsets Insets space between the popup bounds and the menu items (includes the space needed to paint a 1 pixel border)
PopupMenu.borderCornerRadius v3.1 - int

popup border corner radius for native borders

Note that this is not available on all platforms since it requires special support. Supported platforms:

  • Windows 11: Only two corner radiuses are supported by the OS. The smaller one is 4px and the larger one 8px. If this value is 1 - 4, then 4px is used. If it is >= 5, then 8px is used.
  • macOS (10.14 and later): Any corner radius is supported. v3.3
PopupMenu.roundedBorderWidth v3.3 - int or float

popup border width for native borders

Note that this is not available on all platforms since it requires special support. Supported platforms:

  • macOS (10.14 and later)

Other

UI Key Style Key v2 Type Description
PopupMenu.font font Font unused
PopupMenu.border border Border usually a FlatPopupMenuBorder