public class BasicButtonListener implements MouseListener, MouseMotionListener, FocusListener, ChangeListener, PropertyChangeListener {
private static final class PressButtonAction extends AbstractAction {
public static void press(final AbstractButton button) {
if (button.isEnabled()) {
final ButtonModel model = button.getModel();
model.setArmed(true);
model.setPressed(true);
button.requestFocusInWindow();
}
}