Use a JToggleButton bean to provide a two-state push button. The button appears to be pushed in when selected, and popped out when not selected. Use JToggleButton beans in a button group for a set of mutually exclusive functions. When the user selects an unselected button in the group, the previously selected button is popped out.
You should not use a JToggleButton bean with AWT components. Although Swing and AWT beans can be mixed, it is inadvisable.
Adding a Button Component
Button Beans
Beans for Visual Composition