Java: JButton actionListener explantation

Posted by MrDoctorProfessorTyler on Stack Overflow See other posts from Stack Overflow or by MrDoctorProfessorTyler
Published on 2012-07-02T03:09:10Z Indexed on 2012/07/02 3:15 UTC
Read the original article Hit count: 185

Filed under:
|
|
|
|

I am extremely confused as to how a JButton works. I have read over the oracle documents of the JButton, but I have failed to see how a JButton can have an actionlistener added to it. I have really always wondered how things like JFrames and all that can have things like .addMouseListener and all that. Can anyone explain how a JButton can have an actionListener added to it like the .addActionListener(...) syntax?

© Stack Overflow or respective owner

Related posts about java

Related posts about swing