Java javax.swing JCheckBoxMenuItem fields, constructors, methods, implement or subclass

Example usage for Java javax.swing JCheckBoxMenuItem fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing JCheckBoxMenuItem.

The text is from its open source code.

Constructor

JCheckBoxMenuItem(Icon icon)
Creates an initially unselected check box menu item with an icon.
JCheckBoxMenuItem(String text)
Creates an initially unselected check box menu item with text.
JCheckBoxMenuItem(Action a)
Creates a menu item whose properties are taken from the Action supplied.
JCheckBoxMenuItem(String text, Icon icon)
Creates an initially unselected check box menu item with the specified text and icon.
JCheckBoxMenuItem(String text, boolean b)
Creates a check box menu item with the specified text and selection state.
JCheckBoxMenuItem(String text, Icon icon, boolean b)
Creates a check box menu item with the specified text, icon, and selection state.
JCheckBoxMenuItem()
Creates an initially unselected check box menu item with no set text or icon.

Method

voidaddActionListener(ActionListener l)
Adds an ActionListener to the button.
voidaddChangeListener(ChangeListener l)
Adds a ChangeListener to the button.
voidaddItemListener(ItemListener l)
Adds an ItemListener to the checkbox.
voidaddMenuKeyListener(MenuKeyListener l)
Adds a MenuKeyListener to the menu item.
voiddoClick()
Programmatically perform a "click".
AccessibleContextgetAccessibleContext()
Gets the AccessibleContext associated with this JCheckBoxMenuItem.
ActiongetAction()
Returns the currently set Action for this ActionEvent source, or null if no Action is set.
StringgetActionCommand()
Returns the action command for this button.
FontgetFont()
Gets the font of this component.
Object[]getSelectedObjects()
Returns an array (length 1) containing the check box menu item label or null if the check box is not selected.
booleangetState()
Returns the selected-state of the item.
StringgetText()
Returns the button's text.
booleanisSelected()
Returns the state of the button.
voidremoveActionListener(ActionListener l)
Removes an ActionListener from the button.
voidsetAccelerator(KeyStroke keyStroke)
Sets the key combination which invokes the menu item's action listeners without navigating the menu hierarchy.
voidsetAction(Action a)
Sets the Action.
voidsetActionCommand(String actionCommand)
Sets the action command for this button.
voidsetEnabled(boolean b)
Enables or disables the menu item.
voidsetFont(Font font)
Sets the font for this component.
voidsetHorizontalTextPosition(int textPosition)
Sets the horizontal position of the text relative to the icon.
voidsetIcon(Icon defaultIcon)
Sets the button's default icon.
voidsetMnemonic(int mnemonic)
Sets the keyboard mnemonic on the current model.
voidsetName(String name)
Sets the name of the component to the specified string.
voidsetSelected(boolean b)
Sets the state of the button.
voidsetState(boolean b)
Sets the selected-state of the item.
voidsetText(String text)
Sets the button's text.
voidsetToolTipText(String text)
Registers the text to display in a tool tip.
voidsetVisible(boolean aFlag)
Makes the component visible or invisible.