how to check if a person presses a button in jframe in java

Solutions on MaxInterview for how to check if a person presses a button in jframe in java by the best coders in the world