public class lopotop extends JFrame implements ActionListener {
button.addActionListener(this);
public void actionPerformed(ActionEvent e) {
//something happens
}
}
I have come across this a number of times and have simply memorised how it is written but I have very little (if any) understanding of what is actually going on, something I find hugely frustrating. What do we mean when we pass (this) to the parameters? Again when we pass (ActionEvent e) what do we mean?
And now i basically want to make my own actionlistner to understand the working (don't want to use
java built in classes or libraries) some one please guide me how i can do that how many classes should i make , what method use in them?
I have tried reading on this matter and have heard talk of overriding methods and other seemingly mind boggling terms but I have not fully grasped this. I am not content simply writing things I do not understand.
I would appreciate a link to a helpful resource that could help me in this regard or, better yet, if someone who understands this spares a moment to explain this as though they were speaking to a rather dull 15year old
Many thanks in advance for your help.