设置JTable表格不可编辑

class BucketTableModel extends DefaultTableModel {
            //设置Table项不可修改
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        }
        DefaultTableModel tableModel = new BucketTableModel();

class BucketTableModel extends DefaultTableModel {
            //设置Table项不可修改
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        }
        DefaultTableModel tableModel = new BucketTableModel();
posted @ 2010-09-06 14:43  BloodAndBone  Views(1903)  Comments(0Edit  收藏  举报