如何获得jtable选中行中的数据,谢谢
如何获得jtable选中行中的数据,谢谢
----------------解决方案--------------------------------------------------------
String str[][] = {{"1","2","3","4","5"},{"6","7","8","9","10"}};
JTable table = new JTable(str);
int row = table.getSelectedRow();
int column = table.getSelectedColumn();
System.out.println(str[row][column]);
----------------解决方案--------------------------------------------------------