How can I check that JButton is pressed? I know that there is a method that its name is \"isEnabled\"
So I try to write a code to test.
JButton has a model which answers these question:
JButton
isArmed()
isPressed()
isRollOVer()
etc. Hence you can ask the model for the answer you are seeking:
if(jButton1.getModel().isPressed()) System.out.println("the button is pressed");