You have to determine the component point from your coordinate. Use this instead of p2 to to create the event.
You have to determine the component point from your coordinate. Use this instead of p2 to to create the event: Point p2 = SwingUtilities. ConvertPoint(this.getGlassPane(), p, component).
You might be able to use the Component Resizer. It would need to be added to all components in advance. Or maybe you could add the listener when you select the component and then remove the listener when you deselect the component.
The code you posted is of little help when guessing what your actual program is doing. When you have problems with your code you need to post a SSCCE.
These words should be contains all threads about Listeners "add the listener when you select the component and then remove the listener when you deselect the component" +1 – mKorbel Jun 8 at 16:48.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.