Dear Friends

I am creating a class EditableTable (Bean component) that has a set for maintaining editable comlumn indexs.

Java Code:
public TreeSet<Integer> editableColumnIndexes=new TreeSet<Integer>();
I have created following function in this class:-

Java Code:
   /**
     * If we change the editable condition of Column/Cell then we have to call this method.
     */
    public void updateEditableColumns() {
	editableColumnIndexes.clear();
        for (int colIndex = 0; colIndex < getColumnCount(); colIndex++)
            if(isCellEditable(0,colIndex))
                editableColumnIndexes.add(colIndex);
    }
Now, Whenever programmer (Who will use this bean component) made changes in model such as:

Java Code:
editableTable1 = new gajesh.widget.EditableTable();
editableTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4", "Title 5"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Object.class, java.lang.Integer.class, java.lang.Integer.class, 

java.lang.Object.class, java.lang.Boolean.class
            };
            boolean[] canEdit = new boolean [] {
                false, true, true, false, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
Then user must call expicitly:
Java Code:
editableTable1.updateEditableColumns();
I WANT TO avoid this explicitly call of updateEditableColumns() i.e. User whenever change editable conidition of column/cell then

What method should be overriden by me in class EditableTable?
OR
What listener should be add int EditableTable's Constructor?


Thanks
GAJESH TRIPATHI