日期:2014-05-20 浏览次数:20767 次
String columnName[] ={"入库编号","商品名称","单价","数量","单位","总额","供应商","入库去向","入库时间","车辆","司机","押运员"};
table = new JTable(){
public boolean isCellEditable(int row, int column) //重写了isCellEditable方法
{
return false;//表格不允许被编辑
}
};
dftm =(DefaultTableModel) table.getModel();
dftm.setColumnIdentifiers(columnName);//设置表头
scrollPane.setViewportView(table);