javax.swing
Class JButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JButton
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
BasicArrowButton, MetalComboBoxButton
public class JButton
extends AbstractButton
implements Accessible

An implementation of a "push" button. See How to Use Buttons, Check Boxes, and Radio Buttons in The Java Tutorial for information and examples of using buttons.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JButton key assignments.

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 JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.

 

Nested Class Summary

protected  class JButton.AccessibleJButton
    This class implements accessibility support for the JButton class.
 
Nested classes inherited from class javax.swing.AbstractButton
AbstractButton.ButtonChangeListener
 
Nested classes inherited from class javax.swing.JComponent
 
Nested classes inherited from class java.awt.Container
 
Nested classes inherited from class java.awt.Component
Component.BltBufferStrategy, Component.FlipBufferStrategy
 

 

Field Summary

 
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY,