Java java.awt Button fields, constructors, methods, implement or subclass

Example usage for Java java.awt Button fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt Button.

The text is from its open source code.

Subclass

java.awt.Button has subclasses.
Click this link to see all its subclasses.

Constructor

Button(String label)
Constructs a button with the specified label.
Button()
Constructs a button with an empty string for its label.

Method

voidaddActionListener(ActionListener l)
Adds the specified action listener to receive action events from this button.
voidaddKeyListener(KeyListener l)
Adds the specified key listener to receive key events from this component.
voiddisable()
voidenable()
booleanisEnabled()
Determines whether this component is enabled.
voidsetActionCommand(String command)
Sets the command name for the action event fired by this button.
voidsetBounds(int x, int y, int width, int height)
Moves and resizes this component.
voidsetCursor(Cursor cursor)
Sets the cursor image to the specified cursor.
voidsetFont(Font f)
Sets the font of this component.
voidsetLabel(String label)
Sets the button's label to be the specified string.
voidsetMaximumSize(Dimension maximumSize)
Sets the maximum size of this component to a constant value.