java - Determine Which JTable Cell is Clicked -
when user clicks cell on jtable, how figure out row , column of clicked cell?  how show information in jlabel?
the existing answer works, there alternate method may work better if you're not enabling cell selection. inside mouselistener, this:
public void mouseclicked(java.awt.event.mouseevent event) {     int row = thetable.rowatpoint(event.getpoint());     int col = thetable.columnatpoint(event.getpoint());     // ... 
Comments
Post a Comment