设置JTable表格不可编辑 table= new JTable(tableDataModel) { public boolean isCellEditable(int row, int column) { return false; }// 表格不允许被编辑 };