The only other class I've made is a JFrame to show a GUI, except that I haven't written any other program.
I still don't understand why it doesn't recognize actionperformed for the Button but I...
Type: Posts; User: ICEPower
The only other class I've made is a JFrame to show a GUI, except that I haven't written any other program.
I still don't understand why it doesn't recognize actionperformed for the Button but I...
I don't think I understand the problem, but I also don't really understand what you're saying about a program that shows the problem. I'm kind of really new to Java.
Thank you for the help though!
When I click a button, suppose PLAY, it should print out "hello". It doesn't do that, so I think the THIS in knop.addActionListener(THIS) is for the ActionListener and is supposed to be written in...
If I modify the constructor like this (with JButton knop) the ActionListener works and does print "Hello" like it is written in the actionPerformed method.
so from that I can see that the problem...
It doesnt give an error message, the ActionListener just doesn't work. When I click a button it does nothing..
Thank you for your response!
public class MainMenu extends JPanel implements...
Hello,
I'm trying to write a method that makes a JButton and adds actionlistener but it doesn't work.
The code below is written in a Class that extends JPanel implements ActionListener.
I...