swing jtable设置某些列可编辑

class MyTableModel extends DefaultTableModel{

        private MyTableModel(Object[][] cellData, String[] columnNames) {
            //this.getRowCount();
           
            super(cellData, columnNames);
        }

        @Override
        public boolean isCellEditable(int row, int column) {
        return column==0?true:false;
        }

        }

你可能感兴趣的:(swing)