日期:2014-05-20 浏览次数:20721 次
private JTable table;
private DefaultTableModel tableModel;
table = new JTable();
jScrollPane1.setViewportView(table);
table.setModel(tableModel);
private void showVector() {
Vector list = new Vector();
int value = 0;
for (int j = 0; j < 3; j++) {
list.clear();
for (int i = 0; i < 6; i++) {
list.add(value++);
}
tableModel.addRow(list);
}
}