Hi, excuse my english...
I have 3 classes. The main, myarrow and myblock.
The blocks are connected by arrows, and each arrow has the mouselistener.
Myblock extends Jpanel.
MyArrow extends Jcomponent and implement mouselistner, the size of myarrow covers the frame.
So the click of the mouse only works on a component.
As far as I can see, both of your MyArrow components have the same size as the entire frame. So one of them is on top of the other one. Naturally (if I'm right, anyway) you can only click on the one which is on top.
Perhaps restricting the size to the actual visible part of the component would help?
Joined: Jun 02, 2014
My original project is full of arrows.
Is there a way to click on each arrow?
To give the size and the location becomes more complicated...
As far as I know, only one component is supposed to respond to a mouse click. So if you want both arrows to respond if they are both under where the click took place, sorry, that isn't going to happen.