import javax.swing.*;
import java.awt.*;
import javax.swing.table.DefaultTableModel;
public class Test extends JFrame {
public static void main(String[] args) {
JFrame jframe = new JFrame();
jframe.setBounds(50, 50, 200, 300);
DefaultTableModel tableModel = new DefaultTableModel(100, 100);
JTable jTable=new JTable(tableModel){
public boolean isCellEditable(int row, int column) {
return false;
}
};
jframe.getContentPane().add(jTable);
jframe.setLayout(new FlowLayout());
jframe.setVisible(true);
}
}