Reputation: 3432
Sorry, but I am afraid!
I have mouse listener attached to my custom tab component. When I click on this tab I want to translate mouse Point to coordinates of parent JTabbedPane.
How to do this in swing?
Thanks friends!
Upvotes: 1
Views: 120
Reputation: 3432
It appeares to be very easy to do.
Class javax.swing.SwingUtilities
has a set of methods that convert Point and Rectangle from coordinate system of one component to another component.
It is also possible to convert MouseEvent.
Upvotes: 1