Ask Questions?

View Latest Questions

Advertisement


 
 

Buttons
Posted on: July 22, 2006 at 12:00 AM
This is a standard button which can have text, icon, or both.

Java: Buttons

There are many kinds of buttons, all derived from the AbstractButton class.

ComponentsDescription
JButton This is a standard button which can have text, icon, or both.
Listener: addActionListener(...)
JCheckBox The box next to the text can be toggled on or off.
JRadioButton, ButtonGroup Radio buttons are a group of buttons that can have at most one button toggled on. When you click one button, that button is toggled on, and all others are set to off.
JMenuItem Menu items are a kind of button.
JToggleButton Changes between two states: on and off. Stays on/off until the next click.
Copyleft 2003 Fred Swartz MIT License, Last update: 2000-04-09
Advertisement


DMCA.com