jtable如何获取整列数据
1、创建一个工程test,在里面创建“Jtable_test”。

3、运行后获得的是一个这样的hello表格,两行三列的表格。

5、然后通过getRowCoutn、与getValueAt遍历输出列2中的所有数据,并输出。int coln=2;for(int i=0;i<table.getRowCount();i++){ Object onecell= table.getValueAt(i,coln); System.out.println(onecell);}

1、创建一个工程test,在里面创建“Jtable_test”。
3、运行后获得的是一个这样的hello表格,两行三列的表格。
5、然后通过getRowCoutn、与getValueAt遍历输出列2中的所有数据,并输出。int coln=2;for(int i=0;i<table.getRowCount();i++){ Object onecell= table.getValueAt(i,coln); System.out.println(onecell);}