I have a JTable and a popup menu that is specific to each row. I want to calculate the row on which the user right-clicked his mouse (Windows L&F) to bring up the popup
If you don't mind selecting your row on right button click, then in the MouseListener use JTable.rowAtPoint() and select the row if it's not selected, and then in the popup listener use JTable.getSelectedRows() to process your rows. Or you can save them in a separate data structure that you can access from your popup menu listener.