// Guaranteed to return a non-null array
if (!_button.getModel().isPressed()) {
return;
}
ActionListener[] listeners = _button.getActionListeners();
ActionEvent e = null;
// Process the listeners last to first, notifying
// those that are interested in this event
for (int i = listeners.length - 1; i >= 0; i--) {
ActionListener listener = listeners[i];
if (e == null) {
String actionCommand = event.getActionCommand();
if (actionCommand == null) {
actionCommand = _button.getActionCommand();
}
e = new ActionEvent(_button,
ActionEvent.ACTION_PERFORMED,
actionCommand,
event.getWhen(),
event.getModifiers());
}