Java Reference
In-Depth Information
Table 6-4. JMenuItem UIResource Elements
Property String
Object Type
MenuItem.acceleratorDelimiter
String
MenuItem.acceleratorFont
Font
MenuItem.acceleratorForeground
Color
MenuItem.acceleratorSelectionForeground
Color
MenuItem.actionMap
ActionMap
MenuItem.arrowIcon
Icon
MenuItem.background
Color
MenuItem.border
Border
MenuItem.borderPainted
Boolean
MenuItem.checkIcon
Icon
MenuItem.commandSound
String
MenuItem.disabledForeground
Color
MenuItem.font
Font
MenuItem.foreground
Color
MenuItem.margin
Insets
MenuItem.opaque
Boolean
MenuItem.selectionBackground
Color
MenuItem.selectionForeground
Color
MenuItem.textIconGap
Integer
MenuItemUI
String
JMenu Class
The JMenu component is the basic menu item container that is placed on a JMenuBar . When a
JMenu is selected, the menu displays the contained menu items within a JPopupMenu . As with
JMenuItem , the data model for the JMenu is an implementation of ButtonModel , or more specifically,
DefaultButtonModel .
Creating JMenu Components
Four constructors for JMenu allow you to initialize the string label of the menu if desired:
 
Search WWH ::




Custom Search