I have a table component with a popup menu on right click (using the mouseReleased event). When I right click on the table, it does not select the row that I am clicking, it just shows the popup menu. So if I have a different row selected and then right click and select an option from the popup menu, it is the wrong row that is affected. In order to affect the correct row, right now the steps are (1) left click the desired row, then (2) right click the table and select the option from the popup menu. I would like to only need to do step (2).
Is there a way for a right click to first select the row where the mouse was clicked, then do the popup menu? Thanks for your help!