Where Am I? Class Hierarchy (JFC) All Classes (JFC)

Class com.sun.java.swing.JButton

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.AbstractButton
                                   |
                                   +----com.sun.java.swing.JButton

public class JButton
extends AbstractButton
implements Accessible

An implementation of a "push" button.

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 Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.


Constructor Index

JButton()
Creates a button with no set text or icon.
JButton(Icon)
Creates a button with an icon.
JButton(String)
Creates a button with text.
JButton(String, Icon)
Creates a button with initial text and an icon.

Method Index

getAccessibleContext()
Get the AccessibleContext associated with this JComponent
getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
isDefaultButton()
Returns whether or not this button is the default button on the RootPane.
updateUI()
Notification from the UIFactory that the L&F has changed.

Constructors

JButton
 public JButton()
Creates a button with no set text or icon.

JButton
 public JButton(Icon icon)
Creates a button with an icon.

Parameters:
icon - the Icon image to display on the button
JButton
 public JButton(String text)
Creates a button with text.

Parameters:
text - the text of the button
JButton
 public JButton(String text,
                Icon icon)
Creates a button with initial text and an icon.

Parameters:
text - the text of the button.
icon - the Icon image to display on the button

Methods

updateUI
 public void updateUI()
Notification from the UIFactory that the L&F has changed.

Overrides:
updateUI in class AbstractButton
See Also:
updateUI
getUIClassID
 public String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.

Returns:
"ButtonUI"
Overrides:
getUIClassID in class JComponent
See Also:
getUIClassID, getUI
isDefaultButton
 public boolean isDefaultButton()
Returns whether or not this button is the default button on the RootPane.

Returns:
"boolean"
See Also:
setDefaultButton
getAccessibleContext
 public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this JComponent

Returns:
the AccessibleContext of this JComponent
Overrides:
getAccessibleContext in class JComponent

Where Am I? Class Hierarchy (JFC) All Classes (JFC)