Hello,
I wrote another MouseListener, and it works, but anytime if I click on the panel, the console Writes 200 times "Hello World" instead of once.
What did I wrong?
There's no reason there why it would execute more than once. So the problem is probably to do with where you're adding the MouseListener.
My guess is that instead of adding it once when you set the component up, you're adding it somewhere that keeps being executed. That means that you end up with loads of listeners attached to your component, and each event gets sent to all of them.