moved button handler from onMouseClicked to onAction