I have an extended JTable that I want to add a popup menu to that would appear when the user right clicks on a table row.
It is currently implemented and working except there appears to be a problem when the table is in a scroll pane and is scrolled.
The code I use to show the populate is as follows:
menu.show( MyTable.this, e.getX(),e.getY() ) ;
And the symptons are that if the table has a scroll bar ( i.e. there are more rows then can be displayed ) and I scroll down to some lower rows and right click the mouse, the popup menu appears just fine but the table is automatically scrolled back to the top row and the selected row isn't visible.
Any ideas here?
Thanks.