Here you can find the source of getDefaultTableModel()
public static DefaultTableModel getDefaultTableModel()
//package com.java2s; //License from project: Apache License import javax.swing.table.DefaultTableModel; public class Main { public static DefaultTableModel getDefaultTableModel() { return new DefaultTableModel() { @Override//from w w w .j a v a2 s. c o m public boolean isCellEditable(int row, int column) { return false; } }; } }