0

ActionListener for a Jbutton

How we can set an ActionListener for a Jbutton with icon ?

31st May 2020, 6:25 PM
Zahra
3 Réponses
31st May 2020, 6:43 PM
Denise Roßberg
Denise Roßberg - avatar
0
Hello Zahra Your class can implement an actionlistener. Or you can use anomymous classes. https://stackoverflow.com/questions/284899/how-do-you-add-an-actionlistener-onto-a-jbutton-in-java
31st May 2020, 6:36 PM
Denise Roßberg
Denise Roßberg - avatar
0
Yes I know that when I add a text to a JButton But when I add an image to a JButton how I can do that?
31st May 2020, 6:41 PM
Zahra