I have a JFrame with several JTables. On one specific JTable, I need the position of the cell in the JFrame that is selected (selection is done through code) as soon as it is selected. I would like to do something here on glass glass. How can i do this?
Point p = gui.rerouteTable.getLocation();
SwingUtilities.convertPointToScreen(p,gui.rerouteTable);
I thought this could lead me to the upper left corner of the table. And through Cell Height and SelectionListener I could recoup the position I need. But I canโt even take the upper left corner of the table. Why not? The result of gui.rerouteTable.getLocation () returns (0,0), so it is obvious that convertPointToScreen is not working correctly.
source
share