Example usage for Java java.awt Button fields, constructors, methods, implement or subclass
The text is from its open source code.
Button(String label) Constructs a button with the specified label. | |
Button() Constructs a button with an empty string for its label. |
void | addActionListener(ActionListener l) Adds the specified action listener to receive action events from this button. |
void | addKeyListener(KeyListener l) Adds the specified key listener to receive key events from this component. |
void | disable() |
void | enable() |
boolean | isEnabled() Determines whether this component is enabled. |
void | setActionCommand(String command) Sets the command name for the action event fired by this button. |
void | setBounds(int x, int y, int width, int height) Moves and resizes this component. |
void | setCursor(Cursor cursor) Sets the cursor image to the specified cursor. |
void | setFont(Font f) Sets the font of this component. |
void | setLabel(String label) Sets the button's label to be the specified string. |
void | setMaximumSize(Dimension maximumSize) Sets the maximum size of this component to a constant value. |