JTable.addMouseListener添加鼠标监听器,实现弹出式菜单,在JMenuItem中添加ActionListener,来获取用户所选中的行。就OK了。public int[] getSelectedRows() --JTable Returns the indices of all selected rows. Returns: an array of integers containing the indices of all selected rows, or an empty array if no row is selected See Also: getSelectedRow()
http://www.sunxin.org/video/java.asp
an array of integers containing the indices of all selected rows, or an empty array if no row is selected
See Also:
getSelectedRow()