Module java.desktop
Package javax.swing

Class AbstractButton

java.lang.Object
All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
JButton, JMenuItem, JToggleButton

@JavaBean(defaultProperty="UI") public abstract class AbstractButton extends JComponent implements ItemSelectable, SwingConstants
Defines common behaviors for buttons and menu items.

Buttons can be configured, and to some degree controlled, by Actions. Using an Action with a button has many benefits beyond directly configuring a button. Refer to Swing Components Supporting Action for more details, and you can find more information in How to Use Actions, a section in The Java Tutorial.

For further information see How to Use Buttons, Check Boxes, and Radio Buttons, a section in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see XMLEncoder.

Since:
1.2