Class java.awt.Button
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.Button

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Button

public class Button
extends Component
A class that produces a labeled button component.

Constructor Index

 o Button()
Constructs a Button with no label.
 o Button(String)
Constructs a Button with a string label.

Method Index

 o addNotify()
Creates the peer of the button.
 o getLabel()
Gets the label of the button.
 o paramString()
Returns the parameter String of this button.
 o setLabel(String)
Sets the button with the specified label.

Constructors

 o Button
  public Button()
Constructs a Button with no label.
 o Button
  public Button(String label)
Constructs a Button with a string label.
Parameters:
label - the button label

Methods

 o addNotify
  public synchronized void addNotify()
Creates the peer of the button. This peer allows us to change the look of the button without changing its functionality.
Overrides:
addNotify in class Component
 o getLabel
  public String getLabel()
Gets the label of the button.
See Also:
setLabel
 o setLabel
  public void setLabel(String label)
Sets the button with the specified label.
Parameters:
label - the label to set the button with
See Also:
getLabel
 o paramString
  protected String paramString()
Returns the parameter String of this button.
Overrides:
paramString in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index