I have a JTable that's buried in my UI. I get a Rectangle
object for one of my cells. From what I understand, this cells Rectangle
(aka bounds) are relative to its container (a JPanel
).
What I need is this rectangles location relative to its containing JFrame. I am aware of
SwingUtilities.convertPoint(Component source,
Point aPoint,
Component destination)
And I call it like so:
SwingUtilities.convertPoint(jtable,
tableCellRectangle.getLocation(),
jframe);
The converted point however is not correct. I am thinking passing in the jtable is not correct. I am not sure what exactly to pass in for the first parameter. Can anyone provide insight how I can convert my point?